TcpNetworkClient Class |
Namespace: StreamCoders.Network
The TcpNetworkClient type exposes the following members.
Name | Description | |
---|---|---|
![]() | TcpNetworkClient |
Default constructor.
|
![]() | TcpNetworkClient(AddressFamily) |
Constructor.
|
![]() | TcpNetworkClient(Socket, State) |
Instantiates TCPClient with a socket directly.
Instantiating TCPClient with an already created socket. Calling Init is not required and will result in an exception being thrown. |
![]() | TcpNetworkClient(AddressFamily, Boolean, Int16, Int32) |
Constructor.
|
Name | Description | |
---|---|---|
![]() | IsConnected |
Returns true if socket is connected to endpoint, otherwise false.
|
![]() | RemoteEndpoint |
Gets the underlying remote endpoint. The value is only valid when the underlying socket is connected.
|
Name | Description | |
---|---|---|
![]() | Close |
Closes the established connection.
|
![]() | Connect(EndPoint, Boolean) |
Initiates TCP connect to remote endpoint.
|
![]() | Connect(String, Int32, Boolean) |
Initiates TCP connect to remote endpoint.
|
![]() | Equals |
Tests if this TcpNetworkClient is considered equal to another.
|
![]() | Send(Byte) |
Sends a buffer to the remote end of the connection.
|
![]() | Send(String) |
Send this message.
|
![]() | Send(OffsetBufferByte) |
Sends a buffer to the remote end of the connection.
|
![]() | Shutdown |
Call Shutdown before Close() to ensure that data is sent/received before the socket is
closed.
|
![]() | StartReceiveChain |
When packet reception is needed, this method starts the initial receive chain.
|
Name | Description | |
---|---|---|
![]() | OnConnected |
Optional. Is called when a connection is initially established.
|
![]() | OnDisconnect |
Will be called once on transition from Connected to Disconnected.
|
![]() | OnError |
Is called when the underlying socket has transitioned to an error state.
|
![]() | OnReceive |
Is called when a packet has been received.
|
![]() | OnSend |
Is called after an asynchronous send operation has completed.
|
Name | Description | |
---|---|---|
![]() | ConnectTimeout |
Timespan to wait for connection to be established when synchronous parameter is true.
|
![]() | KeepAliveInterval |
Interval in which keep-alive messages are sent.
|
![]() | KeepAliveTimeout |
Time until a half-closed / half-open connection is terminated. This can be the case when
a router or cable was disconnected.
To turn off keep-alive checking set KeepAliveTimeout to Timespan.Zero |
![]() | SendTimeout |
TimeSpan specifying how long to wait for Send operation to finish before socket is closed and OnError is invoked. Set this property to TimeSpan.Zero to disable send timeout.
When a socket send operation times out an OnError event will be generated where Error == SocketError.TimedOut, after which appropriate action must be taken by the application.
|
Name | Description | |
---|---|---|
![]() | Copy | Overloaded.
Creates a copy of the object.
(Defined by ObjectExtensions.) |
![]() | Copy(Object) | Overloaded.
Creates a deep copy of the object using the supplied object as a target for the copy operation.
(Defined by ObjectExtensions.) |