> OK, so I accept the connection into a temporary TWSocket, get the IP
> address and then decide which permanent TWSocket I want to use and Dup
> the handle.  How do I then 'undup' the handle so I can free the
> temporary socket without closing the connection?
> This application listens on multiple ports for TCP or UDP connections,
> when it finds TCP from an expected IP addresses it allocates them to a
> previously created TWSocket.

>From your OnSessionAvailable, you call Accept on behalf on the listening 
socket. You get the socket handle.
Then you call WSocket_getsockname to get the remote IP/Port. Then you can 
decide which TWSocket to use and call Dup to assign it then socket handle 
you've got.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to