-
I've got a chat program that I am writing. I have the server listening on port 14000 for a connection. The client connects from 13000. The connection works, however, when you disconnect the client and have the server close the port then listen on port 14000 again, it doesn't allow any connections. Does anyone know why?
Thanks in advance for your help!
PS: I'm new to using Winsock.
------------------
If you want to be known, GET ON THE NET!
-
have you closed the socket like this:
If Winsock1.state <> sckClosed Then Winsock1.close
?
------------------
Razzle
ICQ#: 31429438
-
I have already closed the socket and then involked the listen command on the server. Are you talking about the client - because I did close the socket on the client.
Any other suggestions?
-
Try setting the localport of the client to 0 before you connect each time.
If the port is zero when you connect, winsock will assign it a unused port instead of using the same port.
------------------
-FirePoweR-
[email protected]
[This message has been edited by FirePoweR (edited 02-07-2000).]
-
So basically your telling me to only assign the remote port and not the local port right? I'll try it!
Thanks!
------------------
If you want to be known, GET ON THE NET!