> 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?
It is likely that you confuse between local port and remote (peer) port. NetStat show the local port while PeerName.sin_port returns the remote port. Use TWSocket.GetXPort instead of TWSocket.PeerPort. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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