#![doc = include_str!("../README.md")]
#![no_std]
#![deny(unsafe_code)]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std;
pub extern crate ts_netstack_smoltcp_core as netcore;
#[doc(inline)]
pub use netcore::smoltcp::wire::IpProtocol;
macro_rules! socket_requestor_impl {
() => {
fn request_blocking(
&self,
command: impl Into<$crate::netcore::Command>,
) -> Result<$crate::netcore::Response, $crate::netcore::ChannelClosedError> {
::netcore::HasChannel::request_blocking(&self.sender, Some(self.handle), command)
}
async fn request(
&self,
command: impl Into<$crate::netcore::Command>,
) -> Result<$crate::netcore::Response, $crate::netcore::Error> {
::netcore::HasChannel::request(&self.sender, Some(self.handle), command).await
}
};
}
mod create_socket;
pub use create_socket::CreateSocket;
pub mod ping;
mod raw;
mod tcp;
mod udp;
pub use ping::PingError;
#[cfg(feature = "tokio")]
pub use ping::ping;
pub use raw::RawSocket;
pub use tcp::{TcpListener, TcpStream};
pub use udp::UdpSocket;