November 24th, 2004, 08:53 AM
|
#1 (permalink)
|
| Junior Member
Join Date: Jun 2004 Location: USA
Posts: 27
| Solution to error 10096 using winsock in Visual basic
I have posted on Help (Again) - VB6 ... In where I was wondering why the program would give an error 10096 after I connect to a port, I would disconnect from the port, and it would stay open for 2-4 minutes extra after I disconnected to it. I found a solution to this problem on MSDN (for once). The reason is that after a connect, Windows and VB keep ports open for 2-4 minutes after a disconnect, because 2 minutes is the maximum length of time after a send that a client/server could respond. So of course they keep the port open for at a most of 2 minutes more (unecissary [I know the spelling is wrong]). So in order to deal withthis, I just created a Winsock array, and if there is an error 10096 I have it just load another element and connect through that, in response to this action the server has up to 100 ports open at a time.
Soooo, if anyone has come across this error, this is my solution, has anyone else come up with this or any other solution.
Dar |
| |