Rogue Wave Server Component library for .NET Reference Guide
|
|
TcpConnectionGetConnection Method |
Creates a connection.
Namespace: RW.Server.Tcp
Assembly: RW.Server.Tcp (in RW.Server.Tcp.dll) Version: 7.0.0.0 (7.0.0.0)
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: TcpConnectionThe resulting connection.
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.