ConnectEx and SO_UPDATE_CONNECT_CONTEXT



In the doc for ConnectEx it says, " When the ConnectEx function returns, the
socket s is in the default state for a connected socket. The socket s does
not enable previously set properties or options until
SO_UPDATE_CONNECT_CONTEXT is set on the socket. Use the setsockopt function
to set the SO_UPDATE_CONNECT_CONTEXT option."
Yet in the doc for setsockopt it says," Updates the accepting socket with
the context of the listening socket. "

My question is: What am I updating a connected socket to? There is no
listening socket to pass in as a value to setsockopt. Accepted sockets have
listeners, not connecting ones. Is this call necesarry in the case of a
connected socket?

Thanx!




.



Relevant Pages

  • Re: server scenario - variables in the right spot?
    ... Well, I was going to point you to the Socket samples on MSDN, but after looking at them I'm not sure they are the best place to look for guidance. ... call Socket.EndAcceptwith current AsyncResult to get the connected socket ... call Socket.BeginSendon the connected socket to send data to the client ... void ReceiveCallback() ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Linux poll() again
    ... changes on a connected socket, ... I just implemented a hack. ... It's about time for poll() to return the correct ...
    (Linux-Kernel)
  • Re: Non blocking mode of socket connection doesnt work
    ... Acceptreturns another socket, the connected socket with ... connected socket with which to communicate to him ... ioctlsocket- change blocking mode for connected socket ... Only the call to recv is blocking. ...
    (microsoft.public.windowsce.app.development)
  • Re: Non blocking mode of socket connection doesnt work
    ... You would not be calling recv() on the same socket identifier as you call ... connected socket with which to communicate to him ... ioctlsocket- change blocking mode for connected socket ...
    (microsoft.public.windowsce.app.development)
  • Re: Linux poll() again
    ... changes on a connected socket, ... timeout, and the client disconnects, it returns ... If you want nonblocking behavior, you should set the socket to nonblocking. ...
    (Linux-Kernel)