Thank Wilfried, thats explains a lot.

When the server listen to port 2500, and the socket port start increasing
from 2000. Do I get in trouble when it comes finaly to port 2489,2499..2500
the same port where the server is listening, or is this handled automaticaly
by the socket that the increasing port will never be the listening server
port ?
To explain more: my program get every 10 seconds an incoming client, get the
command, then close again. And I see the port increasing fast, what about a
limit ? can I reset the portnumber?, it's a black hole for me.

The client has port 2000. When the client change his port to 2001, is there
a way, when connecting to the server to retreive the clients actual port
address?. I must know this port because I need to contact this client back
on an other WSocket. Ofcourse it wil work fine if the client don't change
his port number.

Thanks a lot
Werner


----- Oorspronkelijk bericht ----- 
Van: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
Aan: "ICS support mailing" <twsocket@elists.org>
Verzonden: vrijdag, maart 31, 2006 10:11
Onderwerp: Re: [twsocket] Port number


> Hello Werner,
>
> It is the exact peer port. I try to explain:
>
> -- for a server --
> Server listens on a certain addr:port. Client connect to that port, but
> server should stay listening, so the listening port has to be kept free,
> so as fast as possible the socket is duped to another local port. This
> port increase after each connect because the OS hold it in time_wait
>
> -- for a client --
> Client connect to a certain addr:port. But local it is also bound to an
> addr and port. This is the peer port when it is called by the server
> end.
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Thursday, March 30, 2006, 20:58, Werner wrote:
>
> > Hi All,
>
> > Using WSocket and GetPeerPort. The client has for example port 2000
> > When recieving a package then close again, then recieving -close,
> > etc I receive 2001 then next package 2002, 2003, etc. as portNumber
> > The portnumber seems to increase all the time, and not giving me
> > the exact PeerPort like the PeerAddr wich is correct.
>
> > GetPeerPort , PeerPort give me not the peerport from the client.
> > I have tested this in a local lan, maybe this would be the problem ?
>
> > Any idee how to get the actual portnumber from the client side, when the
client is connected
> > Thanks for any suggestions
> > Greetings - Werner
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
>

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to