TCPConnection GetConnection Method (ConnectionInfo, Boolean)NetworkComms.Net Help
Create a TCPConnection with the provided connectionInfo. If there is an existing connection that will be returned instead. If a new connection is created it will be registered with NetworkComms and can be retrieved using GetExistingConnection(ConnectionInfo) and overrides.

Namespace: NetworkCommsDotNet.Connections.TCP
Assembly: NetworkCommsDotNet (in NetworkCommsDotNet.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax

public static TCPConnection GetConnection(
	ConnectionInfo connectionInfo,
	bool establishIfRequired = true
)

Parameters

connectionInfo
Type: NetworkCommsDotNet ConnectionInfo
ConnectionInfo to be used to create connection
establishIfRequired (Optional)
Type: OnlineSystem Boolean
If true will establish the TCP connection with the remote end point before returning

Return Value

Type: TCPConnection
Returns a TCPConnection
See Also