TCPConnection GetConnection Method (ConnectionInfo, SendReceiveOptions, Boolean)NetworkComms.Net Help
Create a TCP connection with the provided connectionInfo and sets the connection default SendReceiveOptions. If there is an existing connection that is 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,
	SendReceiveOptions defaultSendReceiveOptions,
	bool establishIfRequired = true
)

Parameters

connectionInfo
Type: NetworkCommsDotNet ConnectionInfo
ConnectionInfo to be used to create connection
defaultSendReceiveOptions
Type: NetworkCommsDotNet SendReceiveOptions
The SendReceiveOptions which will be set as this connections defaults
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