Class Tcp.Write
Write data to the TCP connection. If no ack is needed use the special
NoAck object. The connection actor will reply with a Tcp.CommandFailed
message if the write could not be enqueued. If Write.WantsAck
returns true, the connection actor will reply with the supplied Ack
token once the write has been successfully enqueued to the O/S kernel.
Note that this does not in any way guarantee that the data will be
or have been sent! Unfortunately there is no way to determine whether
a particular write has been sent by the O/S.
Implements
Inherited Members
Namespace: Akka.IO
Assembly: Akka.dll
Syntax
public sealed class Tcp.Write : Tcp.SimpleWriteCommand, INoSerializationVerificationNeeded
Fields
| Edit this page View SourceEmpty
Write with no data and Tcp.NoAck
Declaration
public static readonly Tcp.Write Empty
Field Value
| Type | Description |
|---|---|
| Tcp.Write |
Properties
| Edit this page View SourceAck
The optional acknowledgment event which will be sent to the sender of this command.
Declaration
public override Tcp.Event Ack { get; }
Property Value
| Type | Description |
|---|---|
| Tcp.Event |
Overrides
| Edit this page View SourceBytes
The number of bytes that will be written to the socket.
Declaration
public override long Bytes { get; }
Property Value
| Type | Description |
|---|---|
| long |
Overrides
| Edit this page View SourceData
The data we are going to write.
Declaration
public ByteString Data { get; }
Property Value
| Type | Description |
|---|---|
| ByteString |
Methods
| Edit this page View SourceCreate(ByteString)
Creates a write from a ByteString
Declaration
public static Tcp.Write Create(ByteString data)
Parameters
| Type | Name | Description |
|---|---|---|
| ByteString | data | The data to return. |
Returns
| Type | Description |
|---|---|
| Tcp.Write |
Create(ByteString, Event)
Creates a write from a ByteString
Declaration
public static Tcp.Write Create(ByteString data, Tcp.Event ack)
Parameters
| Type | Name | Description |
|---|---|---|
| ByteString | data | The data to return. |
| Tcp.Event | ack | The acknowledgement message we're receive once this write is complete. |
Returns
| Type | Description |
|---|---|
| Tcp.Write |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Edit this page