Class Tcp.Write

All Implemented Interfaces:
Serializable, NoSerializationVerificationNeeded, org.apache.pekko.io.SelectionHandler.HasFailureMessage, Tcp.Command, Tcp.Message, scala.Equals, scala.Product
Enclosing class:
Tcp

public static final class Tcp.Write extends Tcp.SimpleWriteCommand implements scala.Product, Serializable
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 Tcp.SimpleWriteCommand.wantsAck() returns true, the connection actor will reply with the supplied Tcp.SimpleWriteCommand.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.
See Also:
  • Constructor Details

  • Method Details

    • data

      public ByteString data()
    • ack

      public Tcp.Event ack()
      Description copied from class: Tcp.SimpleWriteCommand
      The acknowledgment token associated with this write command.
      Specified by:
      ack in class Tcp.SimpleWriteCommand
    • copy

      public Tcp.Write copy(ByteString data, Tcp.Event ack)
    • copy$default$1

      public ByteString copy$default$1()
    • copy$default$2

      public Tcp.Event copy$default$2()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object