TCPConnection GetConnection Method (ConnectionInfo, SendReceiveOptions, SSLOptions, 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: (

public static TCPConnection GetConnection(
	ConnectionInfo connectionInfo,
	SendReceiveOptions defaultSendReceiveOptions,
	SSLOptions sslOptions,
	bool establishIfRequired = true


Type: NetworkCommsDotNet ConnectionInfo
ConnectionInfo to be used to create connection
Type: NetworkCommsDotNet SendReceiveOptions
The SendReceiveOptions which will be set as this connections defaults
Type: NetworkCommsDotNet.Connections.TCP SSLOptions
SSLOptions to use with this 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