Click or drag to resize
TcpConnectionGetConnection Method
Creates a connection.

Namespace: RW.Server.Tcp
Assembly: RW.Server.Tcp (in RW.Server.Tcp.dll) Version: 6.3.0.0 (0.8.0.0)
Syntax
public static TcpConnection GetConnection(
	string peerHost,
	int peerPort,
	bool create = false,
	int timeout = -1
)

Parameters

peerHost
Type: SystemString
The host name used to create the connection.
peerPort
Type: SystemInt32
The port number used to create the connection.
create (Optional)
Type: SystemBoolean
If set to true, a new connection is created even if there already is a connection on peerHost, on the port peerPort.
timeout (Optional)
Type: SystemInt32
Timeout in milliseconds at creation of the connection if the connection does not already exist.

Return Value

Type: TcpConnection
The resulting connection.
Remarks
If a connection already exists in this process for the given host name and port number, this method returns the existing connection except if the create argument is set to true.
See Also