Skip to content

Tcp Class

sequenze edited this page Jun 19, 2017 · 3 revisions

This classes represents a wrapper for a TCP socket, allowing it to encode and decode the stringbased messages using a provided encoder.

Inheritance Hierarchy

Object > ProtocolBase

Syntax

internal sealed class Tcp : ProtocolBase, IProtocol

Constructors

Name                     Description
Tcp(TcpClient) Initializes a new instances of the Tcp class.

Methods

Name                                       Description
Receive(IEncoder) Reads a single stringbased message from the underlying Tcpclient, and returns the decoded message.
Send(IMessage,IEncoder) Encodes the message and writes it to the underlying tcpclient as a stringbased message.
Close() Closes the underlying tcpclient.

See Also

ProtocolBase, IProtocol, IEncoder, IMessage

Clone this wiki locally