Class TCPHost
A Host that uses TCP to communicate
Implements
Inherited Members
Namespace: VoltRpc.Communication.TCP
Assembly: VoltRpc.dll
Syntax
public sealed class TCPHost : Host, IDisposable
Constructors
| Edit this page View SourceTCPHost(IPEndPoint, int, int)
Creates a new TCPHost instance
Declaration
public TCPHost(IPEndPoint endPoint, int receiveTimeout, int sendTimeout)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endPoint | The IPEndPoint to listen on |
int | receiveTimeout | How long until timeout from receiving |
int | sendTimeout | How long until timeout from sending |
TCPHost(IPEndPoint, int, int, int)
Creates a new TCPHost instance
Declaration
public TCPHost(IPEndPoint endPoint, int bufferSize, int receiveTimeout = 600000, int sendTimeout = 600000)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endPoint | The IPEndPoint to listen on |
int | bufferSize | The initial size of the buffers |
int | receiveTimeout | How long until timeout from receiving |
int | sendTimeout | How long until timeout from sending |
TCPHost(IPEndPoint, ILogger)
Creates a new TCPHost instance
Declaration
public TCPHost(IPEndPoint endPoint, ILogger logger = null)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endPoint | The IPEndPoint to listen on |
ILogger | logger | The ILogger to use. Will default to NullLogger if null |
TCPHost(IPEndPoint, ILogger, int, int)
Creates a new TCPHost instance
Declaration
public TCPHost(IPEndPoint endPoint, ILogger logger, int receiveTimeout, int sendTimeout)
Parameters
Type | Name | Description |
---|---|---|
IPEndPoint | endPoint | The IPEndPoint to listen on |
ILogger | logger | The ILogger to use. Will default to NullLogger if null |
int | receiveTimeout | How long until timeout from receiving |
int | sendTimeout | How long until timeout from sending |
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
Type | Name | Description |
---|---|---|
IPEndPoint | endPoint | The IPEndPoint to listen on |
ILogger | logger | The ILogger to use. Will default to NullLogger if null |
int | bufferSize | The initial size of the buffers |
int | receiveTimeout | How long until timeout from receiving |
int | sendTimeout | How long until timeout from sending |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Will throw if the buffer size is less then 16 |
Fields
| Edit this page View SourceDefaultReceiveTimeout
Default receive timeout time
Declaration
public const int DefaultReceiveTimeout = 600000
Field Value
Type | Description |
---|---|
int |
DefaultSendTimeout
Default send timeout time
Declaration
public const int DefaultSendTimeout = 600000
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceDispose()
Destroys the Host instance
Declaration
public override void Dispose()
Overrides
| Edit this page View SourceStartListening()
Starts listening for incoming requests
Declaration
public override void StartListening()