Skip to content

SendToken

[Source]

Identifies a single send(). Delivered to _on_send_accepted() when the send is accepted, then delivered exactly once more: to _on_sent() when that send's bytes have been handed to the OS, or to _on_send_failed() if the connection is lost or hard-closed first. A graceful close() sends what's still queued, so those sends get _on_sent.

"Handed to the OS" means written to the kernel send buffer, not received by the peer. End-to-end delivery is an application concern -- use your own acknowledgements if you need it.

Tokens use structural equality based on their ID, which is scoped per connection. Applications managing multiple connections should pair tokens with connection identity to avoid ambiguity.

class val SendToken is
  Equatable[SendToken val] ref

Implements


Public fields

let id: USize val

[Source]


Public Functions

eq

[Source]

fun box eq(
  that: SendToken val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: SendToken val)
: Bool val

Parameters

Returns