mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-19 04:26:39 +00:00
29 lines
707 B
Rust
29 lines
707 B
Rust
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
/// An error describing the reason why `bind` failed.
|
|
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
|
pub enum BindError {
|
|
/// All ephemeral ports is exhausted.
|
|
Exhausted,
|
|
/// The specified address is in use.
|
|
InUse,
|
|
}
|
|
|
|
pub mod tcp {
|
|
pub use smoltcp::socket::tcp::{ConnectError, ListenError, RecvError, SendError};
|
|
}
|
|
|
|
pub mod udp {
|
|
pub use smoltcp::socket::udp::RecvError;
|
|
|
|
/// An error returned by [`BoundTcpSocket::recv`].
|
|
///
|
|
/// [`BoundTcpSocket::recv`]: crate::socket::BoundTcpSocket::recv
|
|
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
|
pub enum SendError {
|
|
TooLarge,
|
|
Unaddressable,
|
|
BufferFull,
|
|
}
|
|
}
|