|
-
Feb 5th, 2000, 02:02 PM
#1
Thread Starter
New Member
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!
-
Feb 5th, 2000, 08:49 PM
#2
Addicted Member
have you closed the socket like this:
If Winsock1.state <> sckClosed Then Winsock1.close
?
------------------
Razzle
ICQ#: 31429438
-
Feb 6th, 2000, 01:29 AM
#3
Thread Starter
New Member
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?
-
Feb 7th, 2000, 09:03 AM
#4
Member
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).]
-
Feb 8th, 2000, 11:33 PM
#5
Thread Starter
New Member
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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|