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.TCPAssembly: NetworkCommsDotNet (in NetworkCommsDotNet.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
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: System Boolean
If true will establish the TCP connection with the remote end point before returning
Return Value
Type: TCPConnectionReturns a TCPConnection
See Also