This project is read-only.
Project Description
NetSockets is a .NET class library that provides easy-to-use, multi-threaded, event-based, client and server network communication.

  • Currently only supports TCP communication
  • Multi-threaded
  • Event-based
  • Extensible base classes for streams, clients, and servers
  • Several predefined ready-to-use clients and servers
  • Utility methods (eg: ping)
  • Fully commented

Base Classes
The abstract generic base classes provide core functionality for easily implementing new streams, clients, and servers. The type parameter enables the derived implementations to provide better higher-level interaction when sending and receiving data. See Object Classes below.

"Simple" Classes
The "simple" classes provide the simplest implementations of a stream, client, and server, where all communication is in raw binary format. Sending and receiving is performed with byte arrays.

"Payload" Classes
The "payload" classes provide a stream, client, and server that communicate using packets of data, or "payloads". The payload stream ensures that complete packets are received before raising an OnReceived event. This is done by adding a small header to the data sent, which contains the payload's length.

"Object" Classes
The "object" classes provide a stream, client, and server that communicate using payloads of a specialized NetObject payload. This payload consists of a payload name and a .NET object. This is then serialized and sent as a binary payload. When the payload is received, it is deserialized back into a NetObject. This provides an extremely easy way of communicating with standard and custom .NET data types. However, performance requirements should be considered before using this method - as .NET serializing results in an overhead when in binary form.

A set of utility methods are also provided.

Last edited Mar 20, 2010 at 8:55 PM by advantumdev, version 14