Host Class

Definition

The Host is what receives and responds to a Client's requests

This base Host has no actual implementation of handling connections, a "communication layer" needs to be used for that, such as TCPHost

public abstract class Host : IDisposable
Inheritance
Host
Derived
VoltRpc.Communication.Pipes.PipesHost
VoltRpc.Communication.TCP.TCPHost
Implements

Constructors

Host(ILogger, Int32)

Creates a new Host instance

Fields

BufferSize

This size of the buffer

DefaultBufferSize

The default size of the buffers

Logger

Logger

Properties

ConnectionCount

Count of number of connections

HasDisposed

Has this object been disposed

HideStacktrace

Hides the stacktrace from the client when an Exception is thrown

IsRunning

Is the Host running?

MaxConnectionsCount

What is the maximum amount of connections

TypeReaderWriterManager

The TypeReaderWriterManager for Host

Methods

AddService(Type, Object)

Adds a service to this Host

AddService<T>(T)

Adds a service to this Host

CheckDispose()

Checks if the object has been disposed

Dispose()

Destroys the Host instance

ProcessRequest(BufferedReader, BufferedWriter)

Processes a request from a client

You should only call this if you need to provide a custom BufferedReader and/or BufferedWriter. For example you are using a Stream that needs Position.

ProcessRequest(Stream, Stream)

Processes a request from a client

This override will automatically create the BufferedReader and BufferedWriter for you then call ProcessRequest(BufferedReader, BufferedWriter).

This is the preferred process request method to call.

SetProtocolVersion(Object)

Sets what protocol version to use.

Set value to null to reset back to none.

StartListening()

Starts listening for incoming requests

StartListeningAsync()

Starts listening for incoming requests

Applies to