Click to See Complete Forum and Search --> : Winsock


Timmy
June 14th, 2001, 09:58 AM
I have a Server Client winsock control and need to know a graceful
way of shutting down the Client side without while leaving the Serve
side up and running for other Client connections. Right know if I use
the .Close or shut down the client it also closes the Server tcp connect
to other Clients. I need a way of having the client disconnect from the connection without closing everything.

Thanks in advance!

cksiow
June 14th, 2001, 07:15 PM
I am not sure how winsock control work internally, for winsock API, when you listen to a port and found that the client is connecting to you, you will need to create extra socket to use for that particular connection, and the original one will keep listening for other client. We can control the maximum number of client that we are going to accept using API.

but for winsock control, I afraid you can't, I guess is because the socket limited to 1 connection. However, you can have a timer to constantly check the winsock state (.State), when found it's closed, just start listening again.


HTH

cksiow
http://vblib.virtualave.net - share our codes