The <class>SYSTEM.TCPDevice</class> class provides an interface for retrieving IP address and port of current TCP device. More...
Static Public Member Functions | |
_.Library.Integer | GetDisconnectCode () |
Get the O/S error that caused a <READ> or <WRITE> error due to peer disconnect or network error on a TCP device. More... | |
_.Library.String | LocalAddr (_.Library.Integer Format) |
Get local IP address of current TCP device. More... | |
_.Library.String | LocalAddrPort (_.Library.String Addr) |
Get local IP address and port number of current TCP device. More... | |
_.Library.String | LocalPort () |
Get local port number of current TCP device. More... | |
_.Library.String | PeerAddr (_.Library.Integer Format) |
Get foreign IP address of current TCP device. More... | |
_.Library.String | PeerAddrPort (_.Library.Integer Format) |
Get foreign IP address and port number of current TCP device. More... | |
_.Library.String | PeerPort () |
Get foreign port number of current TCP device. More... | |
![]() | |
_.Library.String | Help (_.Library.String method) |
This is a helper class that is used by the various SYSTEM classes to provide a Help method. More... | |
The <class>SYSTEM.TCPDevice</class> class provides an interface for retrieving IP address and port of current TCP device.
These interfaces support both IPV6 and IPV4 internet addresses.
|
static |
Get the O/S error that caused a <READ> or <WRITE> error due to peer disconnect or network error on a TCP device.
The $IO must be a TCP device or $system.TCPDevice.GetDisconnectCode() generates a <FUNCTION> error.
The error returned will be 0 if the peer closed the TCP connection.
|
static |
Get local IP address of current TCP device.
Parameters:
Format - The format of address to be returned. If this argument is omitted the default value is 0. The value could be:
Return:
Returns the local IP address associated with the TCP device. It could be in binary or text format depends on the Format parameter. For binary format the IP address is in Network order.
If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
If the TCP device is in 'listening' state, the IP address would be all zeros (INADDR_ANY).
|
static |
Get local IP address and port number of current TCP device.
Parameters:
Format - The format of address to be returned. If this argument is omitted the default value is 0. The value could be:
Return:
Returns the local IP address and port number associated with the TCP device. The IP address could be in binary or text format depends on the Format parameter. For binary format the IP address is in Network order.
If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
If the TCP device is in 'listening' state, the IP address would be all zeros (INADDR_ANY).
The return string is a List string with IP address in first and port number in second element.
The port number is a numberic string in Host order.
|
static |
Get local port number of current TCP device.
Return:
Returns the local port number associated with the TCP device. If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
The port number is a numberic string in Host order.
|
static |
Get foreign IP address of current TCP device.
Parameters:
Format - The format of address to be returned. If this argument is omitted the default value is 0. The value could be:
Return:
Returns the foreign IP address associated with the TCP device. It could be in binary or text format depends on the Format parameter. For binary format the IP address is in Network order.
If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
If the TCP device is in 'listening' state or not connected to remote system, it returns a null string.
|
static |
Get foreign IP address and port number of current TCP device.
Parameters:
Format - The format of address to be returned. If this argument is omitted the default value is 0. The value could be:
Return:
Returns the foreign IP address and port number associated with the TCP device. The IP address could be in binary or text format depends on the Format parameter. For binary format the IP address is in Network order.
If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
If the TCP device is in 'listening' state or not connected to remote system, it returns a null string.
The return string is a List string with IP address in first and port number in second element.
The port number is a numberic string in Host order.
|
static |
Get foreign port number of current TCP device.
Return:
Returns the foreign port number associated with the TCP device. If the current device ($IO) is not a TCP device, it gets <FUNCTION> error.
If the TCP device is in 'listening' state or not connected to remote system, it returns a null string.
The port number is a numberic string in Host order.