Class TCPHost

A Host that uses TCP to communicate

Inheritance
TCPHost
Implements
IDisposable
Namespace: VoltRpc.Communication.TCP
Assembly: VoltRpc.dll
Syntax
public sealed class TCPHost : Host, IDisposable

Constructors

| Edit this page View Source

TCPHost(IPEndPoint, int, int)

Creates a new TCPHost instance

Declaration
public TCPHost(IPEndPoint endPoint, int receiveTimeout, int sendTimeout)
Parameters
TypeNameDescription
IPEndPointendPoint

The IPEndPoint to listen on

intreceiveTimeout

How long until timeout from receiving

intsendTimeout

How long until timeout from sending

| Edit this page View Source

TCPHost(IPEndPoint, int, int, int)

Creates a new TCPHost instance

Declaration
public TCPHost(IPEndPoint endPoint, int bufferSize, int receiveTimeout = 600000, int sendTimeout = 600000)
Parameters
TypeNameDescription
IPEndPointendPoint

The IPEndPoint to listen on

intbufferSize

The initial size of the buffers

intreceiveTimeout

How long until timeout from receiving

intsendTimeout

How long until timeout from sending

| Edit this page View Source

TCPHost(IPEndPoint, ILogger)

Creates a new TCPHost instance

Declaration
public TCPHost(IPEndPoint endPoint, ILogger logger = null)
Parameters
TypeNameDescription
IPEndPointendPoint

The IPEndPoint to listen on

ILoggerlogger

The ILogger to use. Will default to NullLogger if null

| Edit this page View Source

TCPHost(IPEndPoint, ILogger, int, int)

Creates a new TCPHost instance

Declaration
public TCPHost(IPEndPoint endPoint, ILogger logger, int receiveTimeout, int sendTimeout)
Parameters
TypeNameDescription
IPEndPointendPoint

The IPEndPoint to listen on

ILoggerlogger

The ILogger to use. Will default to NullLogger if null

intreceiveTimeout

How long until timeout from receiving

intsendTimeout

How long until timeout from sending

| Edit this page View Source

TCPHost(IPEndPoint, ILogger, int, int, int)

Creates a new TCPHost instance

Declaration
public TCPHost(IPEndPoint endPoint, ILogger logger, int bufferSize, int receiveTimeout = 600000, int sendTimeout = 600000)
Parameters
TypeNameDescription
IPEndPointendPoint

The IPEndPoint to listen on

ILoggerlogger

The ILogger to use. Will default to NullLogger if null

intbufferSize

The initial size of the buffers

intreceiveTimeout

How long until timeout from receiving

intsendTimeout

How long until timeout from sending

Exceptions
TypeCondition
ArgumentOutOfRangeException

Will throw if the buffer size is less then 16

Fields

| Edit this page View Source

DefaultReceiveTimeout

Default receive timeout time

Declaration
public const int DefaultReceiveTimeout = 600000
Field Value
TypeDescription
int
| Edit this page View Source

DefaultSendTimeout

Default send timeout time

Declaration
public const int DefaultSendTimeout = 600000
Field Value
TypeDescription
int

Methods

| Edit this page View Source

Dispose()

Destroys the Host instance

Declaration
public override void Dispose()
Overrides
Host.Dispose()
| Edit this page View Source

StartListening()

Starts listening for incoming requests

Declaration
public override void StartListening()
Overrides
Host.StartListening()

Implements

IDisposable