|
Sock.Remoteport R/O Property |
Top Previous Next |
Function: |
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. |
Type: |
Word |
Value Range: |
0-65535, default= 0 |
See Also: |
Details
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.