LOCAL-PORT attribute

Indicates the port number of the socket.

Data type: INTEGER

Access: Read-only

Applies to: Socket object handle

When a server and client successfully establish a connection, both the server and client have a socket object that identifies this connection. On the client, this attribute returns the port number used on the client machine for this socket connection. On the server, this attribute returns the port number used on the server machine for this socket connection. If the CONNECT failed, this attribute returns the Unknown value (?).