Action
Returns the port number of the peer.
Syntax
Result = GETDSTPort( socket)
Remarks
Result |
A WORD variable that is assigned with the port number of the peer or destination port number. |
Socket |
The socket number. |
When you are in server mode, it might be desirable to detect the port number of the connecting client.
You can use this for logging, security, etc.
See also
CONFIG TCPIP, GETSOCKET , SOCKETCONNECT, SOCKETSTAT , TCPWRITE, TCPWRITESTR, CLOSESOCKET , SOCKETLISTEN , GETDSTIP
Partial Example
Dim P as Word
P = GetdstPORT(i)' store current port number of socket i