C# (CSharp) ServerNetworkConnections Namespace

Nested Namespaces

ServerNetworkConnections.Protocol

Classes

Name Description
AbstractMessage
AbstractMessageParser
ClientConnection This class represents a connection to a remote host. It is possible to notify this host with messages that extends upon the "AbstractMessage" class. HOW TO USE: * Initialize the class with needed parameters (see constructor) * Call "Start()" method to start listening for incoming messages and start to write messages * Whenever a message is received from the server, the OnMessageReceived callback is called. * Whenever a message is received but in a corrupted format, the OnMessageFailed is called. * If the connection to the server fails, the OnConnectionFailed is called. The underlying connection will automatically be closed, so you do not need to call the stop method if this delegate is fired. * Writing to the server is non-blocking. All it does is to place the message into a buffer that is then handled by another thread.
ClientConnection.ConnectionFailedEventArgs EventArgs class used for the event of a connection failure.
ClientConnection.MessageFailedEventArgs EventArgs used for the event of a corrupted message was received.
ClientConnection.MessageReader Inner class used to handle the message reading from the given TCPConnection. It will basically at all times try to read from it's the TCPConnection and call the appropriate delegates passwed in the constructor.
ClientConnection.MessageReceivedEventArgs EventArgs class used for the event of receiving a message.
ClientConnection.MessageWriter Inner class used to handle the message writing into the given TCPConnection. It will basically at all times try to read from it's attached buffer, and write the message.
ClientConnectionListener Class that is able to listen for incoming TCP requests.
ClientConnectionListener.InitialConnectionFailedEventArgs EventArgs class for when an initial connection fails.
ClientConnectionListener.InitialConnectionSuccessEventArgs EventArgs class for when a ClientConnection is connected.
ClientID Class representing an ID for a client connection. A connection is identified in one of two ways: Either by a given EndPoint or by a given username. The application has been implemented in such a way that if the username is not null, the given client is authenticated to the server.
TCPConnection Class that encapsulates a socket into a more convenient unit from which you can write AbstractMessage to and read AbstractMessages from
TCPServerConnector Class that encapsulates the workings of a TcpListener