SWIMNIOWriteCommand

public struct SWIMNIOWriteCommand

Used to a command to the channel pipeline to write the message, and install a reply handler for the specific sequence number associated with the message (along with a timeout) when a callback is provided.

  • SWIM message to be written.

    Declaration

    Swift

    public let message: SWIM.Message
  • Address of recipient peer where the message should be written to.

    Declaration

    Swift

    public let recipient: SocketAddress
  • If the replyCallback is set, what timeout should be set for a reply to come back from the peer.

    Declaration

    Swift

    public let replyTimeout: NIO.TimeAmount
  • Callback to be invoked (calling into the SWIMNIOShell) when a reply to this message arrives.

    Declaration

    Swift

    public let replyCallback: ((Result<SWIM.Message, Error>) -> Void)?
  • Create a write command.

    Declaration

    Swift

    public init(message: SWIM.Message, to recipient: Node, replyTimeout: TimeAmount, replyCallback: ((Result<SWIM.Message, Error>) -> Void)?)