usman999_1
December 24th, 2004, 05:25 AM
Hi*!
I am implementing a IOCP server. I create a constant number of sockets (to which the clients will connect) at the starting of my server. When a client disconnect i use reuse the socket using TransmitFile API, so far so good. My problem starts when all of my sockets are occupied/connected at the server and then if another clinet tries to connect and then disconnects (like if i kill the client). Now after that i myself disconnects one the already connected clients (so a socket is freed to be connected by client, the newly freed socket is reinitialised with TransmitFile and AcceptEx is called on it) and try to reconnect, the pending AcceptEx (on the newly freed socket) is never completed i.e the client can't connect even though there is a socket free at the server. This situation only occurs when all my server sockets are occupied, otherwise connecting/disconnecting is not a problem. I hope its clear enough, let me know if you anyone have any question.
Thanks in Advance,
Regards,
Usman.
I am implementing a IOCP server. I create a constant number of sockets (to which the clients will connect) at the starting of my server. When a client disconnect i use reuse the socket using TransmitFile API, so far so good. My problem starts when all of my sockets are occupied/connected at the server and then if another clinet tries to connect and then disconnects (like if i kill the client). Now after that i myself disconnects one the already connected clients (so a socket is freed to be connected by client, the newly freed socket is reinitialised with TransmitFile and AcceptEx is called on it) and try to reconnect, the pending AcceptEx (on the newly freed socket) is never completed i.e the client can't connect even though there is a socket free at the server. This situation only occurs when all my server sockets are occupied, otherwise connecting/disconnecting is not a problem. I hope its clear enough, let me know if you anyone have any question.
Thanks in Advance,
Regards,
Usman.