Class TcpMessage
Helpers for generating TCP messages.
Inherited Members
Namespace: Akka.IO
Assembly: Akka.dll
Syntax
public static class TcpMessage
Methods
| Edit this page View SourceAbort()
Aborts a TCP connection without flushing pending writes.
Declaration
public static Tcp.Command Abort()
Returns
Type | Description |
---|---|
Tcp.Command |
Bind(IActorRef, EndPoint, int)
Bind a TCP listener to a local endpoint.
Declaration
public static Tcp.Command Bind(IActorRef handler, EndPoint endpoint, int backlog)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | handler | The actor who will be handling the TCP listener. |
EndPoint | endpoint | The local endpoint we are binding to. |
int | backlog | TCP backlog - the number of pending connections that the queue will hold. |
Returns
Type | Description |
---|---|
Tcp.Command |
Bind(IActorRef, EndPoint, int, IEnumerable<SocketOption>, bool)
Bind a TCP listener to a local endpoint.
Declaration
public static Tcp.Command Bind(IActorRef handler, EndPoint endpoint, int backlog, IEnumerable<Inet.SocketOption> options, bool pullMode)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | handler | The actor who will be handling the TCP listener. |
EndPoint | endpoint | The local endpoint we are binding to. |
int | backlog | TCP backlog - the number of pending connections that the queue will hold. |
IEnumerable<Inet.SocketOption> | options | A set of socket options. |
bool | pullMode | Specifies whether we're running in "pull mode" or not for all subsequent client connections. |
Returns
Type | Description |
---|---|
Tcp.Command |
Close()
Closes an open TCP connection.
Declaration
public static Tcp.Command Close()
Returns
Type | Description |
---|---|
Tcp.Command |
ConfirmedClose()
Closes a confirmed-to-have-been-previously-running TCP connection.
Declaration
public static Tcp.Command ConfirmedClose()
Returns
Type | Description |
---|---|
Tcp.Command |
Connect(EndPoint)
Connect to a remote TCP endpoint.
Declaration
public static Tcp.Command Connect(EndPoint remoteAddress)
Parameters
Type | Name | Description |
---|---|---|
EndPoint | remoteAddress | The remote endpoint |
Returns
Type | Description |
---|---|
Tcp.Command |
Connect(EndPoint, EndPoint?, IEnumerable<SocketOption>, TimeSpan?, bool)
Connect to a remote TCP endpoint.
Declaration
public static Tcp.Command Connect(EndPoint remoteAddress, EndPoint? localAddress, IEnumerable<Inet.SocketOption> options, TimeSpan? timeout, bool pullMode)
Parameters
Type | Name | Description |
---|---|---|
EndPoint | remoteAddress | The remote endpoint |
EndPoint | localAddress | An optional local endpoint address to bind to. Most users don't specify this. |
IEnumerable<Inet.SocketOption> | options | A set of socket options. |
TimeSpan? | timeout | An optional connect timeout. Will result in a Tcp.CommandFailed message being returned if we exceed this value. |
bool | pullMode | Specifies whether we're running in "pull mode" or not. |
Returns
Type | Description |
---|---|
Tcp.Command |
NoAck(object)
TBD
Declaration
public static Tcp.NoAck NoAck(object token = null)
Parameters
Type | Name | Description |
---|---|---|
object | token | TBD |
Returns
Type | Description |
---|---|
Tcp.NoAck | TBD |
Register(IActorRef, bool, bool)
Registers an actor to handle an outgoing or incoming TCP connection that has been established.
Declaration
public static Tcp.Command Register(IActorRef handler, bool keepOpenOnPeerClosed = false, bool useResumeWriting = true)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | handler | The actor who will be handling the TCP communication. |
bool | keepOpenOnPeerClosed | Keep the connection open if the peer is closed |
bool | useResumeWriting | Use resume / pause writing semantics once buffer gets full |
Returns
Type | Description |
---|---|
Tcp.Command |
ResumeAccepting(int)
TBD
Declaration
public static Tcp.Command ResumeAccepting(int batchSize)
Parameters
Type | Name | Description |
---|---|---|
int | batchSize | TBD |
Returns
Type | Description |
---|---|
Tcp.Command | TBD |
ResumeReading()
TBD
Declaration
public static Tcp.Command ResumeReading()
Returns
Type | Description |
---|---|
Tcp.Command | TBD |
ResumeWriting()
TBD
Declaration
public static Tcp.Command ResumeWriting()
Returns
Type | Description |
---|---|
Tcp.Command | TBD |
SuspendReading()
TBD
Declaration
public static Tcp.Command SuspendReading()
Returns
Type | Description |
---|---|
Tcp.Command | TBD |
Unbind()
Unbinds a previously bound TCP listener.
Declaration
public static Tcp.Command Unbind()
Returns
Type | Description |
---|---|
Tcp.Command |
Write(ByteString, Event)
TBD
Declaration
public static Tcp.Command Write(ByteString data, Tcp.Event ack = null)
Parameters
Type | Name | Description |
---|---|---|
ByteString | data | TBD |
Tcp.Event | ack | TBD |
Returns
Type | Description |
---|---|
Tcp.Command | TBD |