abla/net/contracts
Generated from source.
Import with import "abla/net/contracts".
Source: abla/net/contracts/entry.ab
NetworkError (class)
class NetworkError(
val code: int,
val operation: string,
val category: string,
val retryable: bool
)
Carries a host error code, operation label, portable category and retryable classification.
NetworkError.present (method)
fun present(): bool
Returns whether the error code is nonzero.
NetworkReadOutcome (class)
class NetworkReadOutcome(
val bytes: string,
val state: int,
val error: NetworkError
)
Carries any read bytes and the resulting status and error.
NetworkReadOutcome.hasData (method)
fun hasData(): bool
Returns whether the read produced data.
NetworkReadOutcome.reachedEof (method)
fun reachedEof(): bool
Returns whether the read reached end of stream.
NetworkReadOutcome.timedOut (method)
fun timedOut(): bool
Returns whether the read exceeded its deadline.
NetworkReadOutcome.cancelled (method)
fun cancelled(): bool
Returns whether the read was canceled.
NetworkReadOutcome.wouldBlock (method)
fun wouldBlock(): bool
Returns whether the read would block pending socket readiness.
NetworkReadOutcome.failed (method)
fun failed(): bool
Returns whether the read failed with a network error.
NetworkWriteOutcome (class)
class NetworkWriteOutcome(
val written: int,
val state: int,
val error: NetworkError
)
Carries the byte count written and the resulting status and error.
NetworkWriteOutcome.succeeded (method)
fun succeeded(): bool
Returns whether the write reported success.
NetworkWriteOutcome.timedOut (method)
fun timedOut(): bool
Returns whether the write exceeded its deadline.
NetworkWriteOutcome.cancelled (method)
fun cancelled(): bool
Returns whether the write was canceled.
NetworkWriteOutcome.wouldBlock (method)
fun wouldBlock(): bool
Returns whether the write would block pending socket readiness.
NetworkWriteOutcome.failed (method)
fun failed(): bool
Returns whether the write failed with a network error.
NetworkCancellation (class)
class NetworkCancellation(val requested: () -> bool)
Wraps a callback checked by networking operations for cooperative cancellation.
networkCancellation (fun)
fun networkCancellation(): NetworkCancellation
Returns a cancellation token that always reports no request.
NetworkCancellation.isRequested (extension fun)
fun NetworkCancellation.isRequested(): bool
Returns the current result of the cancellation callback.
networkError (fun)
fun networkError(code: int, operation: string): NetworkError
Classifies a host error code and attaches the operation label.
networkNoError (fun)
fun networkNoError(operation: string): NetworkError
Returns a zero-code outcome for the given operation.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.