SocketTools .NET Edition

InternetServer Class

A general purpose class for developing Internet server applications.

For a list of all members of this type, see InternetServer Members.

System.Object
   SocketTools.InternetServer

[Visual Basic]
Public Class InternetServer
    Implements IDisposable
[C#]
public class InternetServer : IDisposable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The InternetServer class provides a simplified interface for creating event-driven, multithreaded server applications using the TCP/IP protocol. The class interface is similar to the SocketWrench class, however it is designed specifically to make it easier to implement a server application without requiring the need to manage multiple socket classes. In addition, the InternetServer class supports secure communications using the Transport Layer Security (TLS) protocol.

Each instance of the class represents a server, and each active client connection is managed internally and referenced by an integer value which uniquely identifies the client session. All interaction with the server and the clients connected to it uses an event-driven model, with the server application written to respond to events such as OnConnect, OnRead and OnWrite.

Developers who have used the SocketWrench class will find the InternetServer class has a familiar interface, with a subset of properties and methods that are specific to creating a server application. Each of the network events have an extra parameter which specifies the socket handle which should be used when communicating with the client. This enables the application to communicate with multiple clients without having to create multiple socket classes.

Requirements

Namespace: SocketTools

Assembly: SocketTools.InternetServer (in SocketTools.InternetServer.dll)

See Also

InternetServer Members | SocketTools Namespace