Unix Programming - HELP:how to disconnect a SOCK_DGRAM socket?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > July 2007 > HELP:how to disconnect a SOCK_DGRAM socket?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author HELP:how to disconnect a SOCK_DGRAM socket?
studyos

2007-07-26, 7:19 am

which API is designed for this target or no one exists?

Thanks in advanced

David Schwartz

2007-07-26, 7:20 pm

On Jul 26, 1:07 am, studyos <franking...@gmail.com> wrote:

> which API is designed for this target or no one exists?


What do you mean by "disconnect"?

DS

Bin Chen

2007-07-27, 1:19 am

On Jul 26, 4:07 pm, studyos <franking...@gmail.com> wrote:
> which API is designed for this target or no one exists?
>
> Thanks in advanced


Datagram socket doesn't has a concept of disconnect. It is session
less.

Bit Banger

2007-07-27, 1:19 am

studyos <frankinglin@gmail.com> wrote:

>which API is designed for this target or no one exists?
>
>Thanks in advanced
>


Depends which OS you are using.

Linux:

From man 2 connect...
Connectionless sockets may dissolve the association by connecting to
an address with the sa_family member of sockaddr set to AF_UNSPEC.

Solaris:

From man 3 connect...
Datagram sockets can dissolve the association by connecting to a null
address.

Other flavors may vary.
Rainer Weikusat

2007-07-27, 7:18 am

hatespam@hatespam.com (Bit Banger) writes:
> studyos <frankinglin@gmail.com> wrote:
>
> Depends which OS you are using.
>
> Linux:
>
> From man 2 connect...
> Connectionless sockets may dissolve the association by connecting to
> an address with the sa_family member of sockaddr set to AF_UNSPEC.


[...]

BUGS
Unconnecting a socket by calling connect() with a AF_UNSPEC
address is not yet implemented.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com