This interface is implemented by a tcp port device.
interface ITcpPortDevice extends ${IConfigurableDevice} {
// Properties
${remoteHost}: string;
${remoteTcpPort}: number;
${localAddress}: string;
${localTcpPort}: number;
${protocol}: ${TcpPortProtocol};
${connectTimeout}: number;
${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 ${connectTimeout} { 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 ${connectTimeout}; // get set
unsigned ${reconnectTimeout}; // get set
unsigned ${bufferSize}; // get set
};
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: 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: 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: 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: ${TcpPortProtocol};
${TcpPortProtocol} protocol { get; set; }
${TcpPortProtocol} protocol; // get set
Set or retrieve the virtual serial port protocol.
connectTimeout: number;
uint connectTimeout { get; set; }
unsigned connectTimeout; // get set
The value of connection timeout, in milliseconds. When initial connection request takes longer than specified value, it will fail with a timeout error.
If set to zero (default), the system-wide default connection timeout will be used (typically, 20..30 seconds). The system-wide default is configurable through the Registry.
If set to some value other than zero, the minimum of the given value and system-wide TCP connection timeout will be used.
When connection attempt fails due to timeout, different error code is generated, depending on which timeout occurred first: it is Win32 ERROR_TIMEOUT for connectTimeout and SOCKET_ERROR_CONNECTION_TIMED_OUT for system-wide connection timeout.
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: 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.