Sock.Remoteport R/O Property

Top  Previous  Next



For the currently selected socket (selection is made through sock.num) returns the port number of the host with which this socket had the most recent or currently has a connection.



Value Range:

0-65535, default= 0

See Also:

sock.remotemac, sock.remoteip, sock.bcast





The application cannot directly change this property, it can only specify the target port for active opens through the sock.targetport property.

For UDP connections, when the on_sock_data_arrival event handler is entered, the sock.remoteport will contain the port number of the sender of the current datagram being processed. Outside of the on_sock_data_arrival event handler, the property will return the source port of the most recent datagram received by the socket.