Virtual Serial Port Tools - Advanced serial port configurations for your custom ports usage scenario
Download Virtual Serial Port Tools Hide this button

ITcpPortDevice Interface

This interface is implemented by a tcp port device.

Declaration

interface ITcpPortDevice extends ${IConfigurableDevice} {
    // Properties
    ${remoteHost}: string;
    ${remoteTcpPort}: number;
    ${localAddress}: string;
    ${localTcpPort}: number;
    ${protocol}: ${TcpPortProtocol};
    ${reconnectTimeout}: number;
    ${bufferSize}: number;
}
public interface ITcpPortDevice : ${IConfigurableDevice}
{
    // Properties
    string ${remoteHost} { get; set; }
    uint ${remoteTcpPort} { get; set; }
    string ${localAddress} { get; set; }
    uint ${localTcpPort} { get; set; }
    ${TcpPortProtocol} ${protocol} { get; set; }
    uint ${reconnectTimeout} { get; set; }
    uint ${bufferSize} { get; set; }
}
struct ITcpPortDevice : IConfigurableDevice
{
    // Properties
    _bstr_t ${remoteHost};  // get set 
    unsigned ${remoteTcpPort};  // get set 
    _bstr_t ${localAddress};  // get set 
    unsigned ${localTcpPort};  // get set 
    ${TcpPortProtocol} ${protocol};  // get set 
    unsigned ${reconnectTimeout};  // get set 
    unsigned ${bufferSize};  // get set 
};

ITcpPortDevice Properties

remoteHost

remoteHost: string;
string remoteHost { get; set; }
_bstr_t remoteHost;  // get set 

Remote endpoint's host name or address. DNS, NETBIOS and other types of host names are supported as well as IPv4 and IPv6 IP addresses.

Setting this property sets the virtual serial port to “connecting” mode. If the property is read and the virtual port is in “listening” mode, an empty string is returned.

remoteTcpPort

remoteTcpPort: number;
uint remoteTcpPort { get; set; }
unsigned remoteTcpPort;  // get set 

Remote endpoint's TCP port number.

Setting this property sets the virtual serial port to “connecting” mode. If the property is read and the virtual port is in “listening” mode, a value of zero is returned.

localAddress

localAddress: string;
string localAddress { get; set; }
_bstr_t localAddress;  // get set 

Local listening IPv4 or IPv6 address. Can also be * to specify that the port should listen on all local addresses.

Setting this property sets the virtual serial port to “listening” mode. If the property is read and the virtual port is in “connecting” mode, an empty string is returned.

localTcpPort

localTcpPort: number;
uint localTcpPort { get; set; }
unsigned localTcpPort;  // get set 

Local listening TCP port number.

Setting this property sets the virtual serial port to “listening” mode. If the property is read and the virtual port is in “connecting” mode, a value of zero is returned.

protocol

protocol: ${TcpPortProtocol};
${TcpPortProtocol} protocol { get; set; }
${TcpPortProtocol} protocol;  // get set 

Set or retrieve the virtual serial port protocol.

reconnectTimeout

reconnectTimeout: number;
uint reconnectTimeout { get; set; }
unsigned reconnectTimeout;  // get set 

The value of reconnection timeout, in milliseconds. This is the time that virtual serial port waits until trying to re-establish a broken network connection. Only relevant to virtual serial ports in “connecting” mode.

bufferSize

bufferSize: number;
uint bufferSize { get; set; }
unsigned bufferSize;  // get set 

Internal TCP buffer size, in bytes. The default value is 512 KB. Supported range is 4 KB..10 MB. Prefer larger values for high-speed transfers.