pub enum TcpError {
Cancelled,
TimedOut,
Incomplete,
TooBig,
Failed(Error),
}
Expand description
The error type for mtcp I/O operations
mtcp I/O operations return a std::io::Result
,
which will contain an std::io::Error
in case of
failure. For mtcp-specific errors, the returned std::io::Error
contains the suitable variant of mtcp_rs::TcpError
as its “inner” error.
Errors from the mio
layer are passed through “as-is”; do not
expect that an “inner” mtcp_rs::TcpError
is always available!
Variants§
Cancelled
Indicates that the socket operation was cancelled before completion. Data may have been read or written partially!
TimedOut
Indicates that the socket operation encountered a time-out. Data may have been read or written partially!
Incomplete
Indicates that the socket operation finished (usually because the stream was closed) before all data could be read or written.
TooBig
Indicates that the socket read operation was aborted, because the length of the data would have exceeded the specified limit.
Failed(Error)
Indicates that the socket operation has failed. More detailed
information is available via the wrapped io::Error
.