Hello John,
If you connect to a server, then the server accept the connection into a
local port which is different from the listening port. This is how
winsock works, because the Listening port stay listening.
this cannot be different because if the same port should be used for
data transfer then it cannot listen anymore because ip+port has to be
exclusive.
The listening port on the server is the port where the client connects
to, the local port on the server is the port where the connection is on
once it is accepted.
---
Rgds, Wilfried
http://www.mestdagh.biz
Monday, August 22, 2005, 14:23, Dr John M Porteous wrote:
> I am using GetPeerName on an outgoing TXSocket to get/confirm the server
> details in the OnSessionConnected event. I am specifically connecting to a
> fixed address and a fixed port. The Address is returned correctly, however
> the port number (PeerName.sin_port) is never correct.
> If I open a DOS window and use NETSTAT I see the expected port (i.e. the one
> I asked to connect to)
> Is this a known issue?
> Regards
> Dr John M Porteous
> Chemigraphic Ltd Tele: 01293 543517
> (office)
> The Fleming CentreTele: 01293 843385 (DDI)
> Fleming Way Fax: 01293 552859
> Crawley Mobile: 07802 402 226
> RH10 9NF Email:
> [EMAIL PROTECTED]
--
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