Can someone explain the localport and remoteport properties of the winsock control?
I have a server that I want to connect to whatever port the client is using so the server will need to use the random port (localport = 0).
When I do this and have the client use whatever port (i.e. 1024, 100, 3000, whatever) I initiate the connect event but the server never reaches the connectionrequest event. I come to realize that with using the localport=0 on the server and invoke the listen method it will assign a random port to listen to but not the port that the client is using so the connectionrequest event of the server is never performed.
Can anybody provide any assistance with this? And explain the remoteport and localport properties and how they would relate to the server and the client?
Any assistance would greatly be appreciated.