| 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.
|
|
|
|