Home
last modified time | relevance | path

Searched refs:net (Results 1 - 25 of 71) sorted by relevance

123

/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/uds/
H A Dsocket.rs16 use std::os::unix::net;
26 pub(crate) fn bind(path: &Path) -> io::Result<net::UnixListener> {
31 let net = unsafe { net::UnixListener::from_raw_fd(socket) };
37 Ok(net)
40 pub(crate) fn connect(path: &Path) -> io::Result<net::UnixStream> {
45 let net = unsafe { net::UnixStream::from_raw_fd(socket) };
48 _ => Ok(net),
52 pub(crate) fn unbound() -> io::Result<net
[all...]
H A Ddatagram.rs15 use std::os::unix::net;
24 pub(crate) inner: net::UnixDatagram,
46 /// use std::os::unix::net::UnixDatagram;
55 pub fn from_std(socket: net::UnixDatagram) -> UnixDatagram { in from_std()
130 pub fn local_addr(&self) -> io::Result<net::SocketAddr> { in local_addr()
146 pub fn peer_addr(&self) -> io::Result<net::SocketAddr> { in peer_addr()
166 pub fn recv_from(&self, buf: &mut [u8]) -> io::Result<(usize, net::SocketAddr)> { in recv_from()
247 /// use std::net::Shutdown;
257 pub fn shutdown(&self, how: std::net::Shutdown) -> io::Result<()> { in shutdown()
301 use std::net
[all...]
H A Dlistener.rs17 use std::os::unix::net;
28 pub(crate) inner: net::UnixListener,
75 .map(|socket| unsafe { net::UnixStream::from_raw_fd(socket) })? in accept()
86 let socket = unsafe { net::UnixStream::from_raw_fd(socket) }; in accept()
87 Ok::<net::UnixStream, io::Error>(socket) in accept()
101 /// use std::os::unix::net::UnixListener;
110 pub fn from_std(socket: net::UnixListener) -> UnixListener { in from_std()
134 /// use std::os::unix::net::UnixListener;
142 pub fn local_addr(&self) -> io::Result<net::SocketAddr> { in local_addr()
H A Dstream.rs17 use std::os::unix::net;
25 pub(crate) inner: net::UnixStream,
43 /// Creates a new `UnixStream` from a standard `net::UnixStream`
47 /// use std::os::unix::net::UnixStream;
56 pub fn from_std(stream: net::UnixStream) -> UnixStream { in from_std()
105 pub fn local_addr(&self) -> io::Result<net::SocketAddr> { in local_addr()
121 pub fn peer_addr(&self) -> io::Result<net::SocketAddr> { in peer_addr()
147 /// use std::net::Shutdown;
157 pub fn shutdown(&self, how: std::net::Shutdown) -> io::Result<()> { in shutdown()
253 use std::net
[all...]
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/udp/
H A Dsocket.rs14 use std::net::SocketAddr;
17 use std::{io, net};
23 use crate::sys::windows::net::init;
59 /// System call gets net::UdpSocket
60 pub(crate) fn bind(self, addr: SocketAddr) -> io::Result<net::UdpSocket> {
61 let socket = unsafe { net::UdpSocket::from_raw_socket(self.socket as raw::SOCKET) };
H A Dudp_socket.rs15 use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr};
17 use std::{fmt, io, net};
26 pub(crate) inner: net::UdpSocket,
68 /// Convert net::UdpSocket to ylong_io::UdpSocket
69 pub fn from_std(socket: net::UdpSocket) -> UdpSocket { in from_std()
81 /// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
307 pub(crate) inner: net::UdpSocket,
313 /// Convert net::UdpSocket to ylong_io::ConnectedUdpSocket
326 /// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
353 /// use std::net
[all...]
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/
H A Dmod.rs48 mod net; modules
51 pub(crate) use net::NetInner;
63 pub(crate) use net::NetState;
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/windows/tcp/
H A Dlistener.rs15 use std::net::SocketAddr;
17 use std::{fmt, io, net};
26 pub(crate) inner: net::TcpListener,
53 pub fn from_std(listener: net::TcpListener) -> TcpListener { in from_std()
H A Dstream.rs16 use std::net::{Shutdown, SocketAddr};
19 use std::{fmt, io, net};
30 pub(crate) inner: net::TcpStream,
53 pub fn from_std(stream: net::TcpStream) -> TcpStream { in from_std()
73 /// use std::net::{IpAddr, Ipv4Addr};
93 /// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
113 /// use std::net::Shutdown;
241 /// Same as std::net::TcpStream::peek().
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/tcp/
H A Dlistener.rs16 use std::net::{self, SocketAddr};
29 pub(crate) inner: net::TcpListener,
40 inner: unsafe { net::TcpListener::from_raw_fd(socket.as_raw_fd()) }, in bind()
67 Ok(socket) => unsafe { net::TcpStream::from_raw_fd(socket) }, in accept()
81 unsafe { net::TcpStream::from_raw_fd(socket) } in accept()
H A Dstream.rs15 use std::net::{self, Shutdown, SocketAddr};
27 pub inner: net::TcpStream,
38 /// Creates a new `TcpStream` from a standard `net::TcpStream`.
39 pub fn from_std(stream: net::TcpStream) -> TcpStream { in from_std()
55 /// use std::net::{IpAddr, Ipv4Addr};
75 /// use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
199 /// Same as std::net::TcpStream::peek().
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/unix/
H A Ddatagram.rs17 use std::os::unix::net;
22 use crate::net::{AsyncSource, Ready};
41 /// use ylong_runtime::net::UnixDatagram;
57 /// use ylong_runtime::net::UnixDatagram;
111 /// use ylong_runtime::net::UnixDatagram;
147 /// use ylong_runtime::net::UnixDatagram;
181 /// use ylong_runtime::net::UnixDatagram;
216 /// use ylong_runtime::net::UnixDatagram;
246 /// use ylong_runtime::net::UnixDatagram;
258 /// Creates new `UnixDatagram` from a `std::os::unix::net
[all...]
H A Dstream.rs16 use std::net::Shutdown;
18 use std::os::unix::net;
26 use crate::net::{AsyncSource, Ready};
47 /// use ylong_runtime::net::UnixStream;
73 /// Creates new `UnixStream` from a `std::os::unix::net::UnixStream`.
78 /// use std::os::unix::net::UnixStream as StdUnixStream;
80 /// use ylong_runtime::net::UnixStream;
89 pub fn from_std(listener: net::UnixStream) -> Result<UnixStream> { in from_std()
101 /// use ylong_runtime::net::UnixStream;
127 /// use ylong_runtime::net
[all...]
H A Dlistener.rs17 use std::os::unix::net;
22 use crate::net::{AsyncSource, UnixStream};
40 /// use ylong_runtime::net::UnixListener;
53 /// use ylong_runtime::net::UnixListener;
80 /// use std::os::unix::net::UnixListener as StdUnixListener;
82 /// use ylong_runtime::net::UnixListener;
87 pub fn from_std(listener: net::UnixListener) -> Result<UnixListener> { in from_std()
96 /// use ylong_runtime::net::UnixListener;
/commonlibrary/rust/ylong_runtime/ylong_io/src/sys/unix/udp/
H A Dsocket.rs14 use std::net::SocketAddr;
16 use std::{io, net};
46 inner: unsafe { net::UdpSocket::from_raw_fd(self.socket) },
H A Dudp_socket.rs15 use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr};
17 use std::{fmt, io, net};
23 /// UdpSocket. The bottom layer uses std::net::UdpSocket。
66 pub(crate) inner: net::UdpSocket,
93 /// Creates a new `UdpSocket` from a standard `net::UdpSocket`.
99 pub fn from_std(socket: net::UdpSocket) -> UdpSocket { in from_std()
395 pub(crate) inner: net::UdpSocket,
399 /// Creates a new `UdpSocket` from a standard `net::UdpSocket`.
405 pub fn from_std(socket: net::UdpSocket) -> ConnectedUdpSocket { in from_std()
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/
H A Ddriver_handle.rs29 use crate::net::IoHandle;
31 use crate::net::ScheduleIO;
40 #[cfg(feature = "net")]
48 #[cfg(feature = "net")]
52 #[cfg(any(feature = "net", feature = "time"))]
60 #[cfg(feature = "net")]
120 use crate::net::IoHandle;
121 use crate::net::ScheduleIO;
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/net/sys/tcp/
H A Dlistener.rs15 use std::net::SocketAddr;
19 use crate::net::sys::addr::ToSocketAddrs;
20 use crate::net::{AsyncSource, TcpStream};
22 /// An asynchronous version of [`std::net::TcpListener`]. Provides async
29 /// use ylong_runtime::net::TcpListener;
63 /// use ylong_runtime::net::TcpListener;
90 /// use ylong_runtime::net::TcpListener;
115 /// use ylong_runtime::net::TcpListener;
135 /// use ylong_runtime::net::TcpListener;
157 /// use ylong_runtime::net
[all...]
H A Dstream.rs17 use std::net::{Shutdown, SocketAddr};
27 use crate::net::sys::tcp::split::{BorrowReadHalf, BorrowWriteHalf};
28 use crate::net::sys::ToSocketAddrs;
29 use crate::net::AsyncSource;
31 /// An asynchronous version of [`std::net::TcpStream`]
44 /// use ylong_runtime::net::TcpStream;
88 /// use ylong_runtime::net::TcpStream; in fmt()
134 /// use ylong_runtime::net::TcpStream; in fmt()
169 /// use ylong_runtime::net::TcpStream; in fmt()
203 /// use ylong_runtime::net in fmt()
[all...]
/commonlibrary/rust/ylong_runtime/ylong_io/tests/
H A Dtcp_test.rs15 use std::net::SocketAddr;
16 use std::{io, net, thread};
73 let tcp = net::TcpStream::connect(addr); in sdv_tcp_server()
147 let tcp = net::TcpStream::connect(addr); in sdv_tcp_server_vectored()
/commonlibrary/rust/ylong_runtime/ylong_runtime/tests/
H A Duds_test.rs14 #![cfg(all(target_family = "unix", feature = "net"))]
19 use ylong_runtime::net::{UnixDatagram, UnixStream};
116 let (stream, _) = std::os::unix::net::UnixStream::pair().unwrap(); in sdv_uds_stream_baisc_test()
138 let (datagram, _) = std::os::unix::net::UnixDatagram::pair().unwrap(); in sdv_uds_datagram_baisc_test()
/commonlibrary/rust/ylong_runtime/ylong_runtime/examples/
H A Dylong_runtime_tcp.rs15 use std::net::SocketAddr;
18 use ylong_runtime::net::{TcpListener, TcpStream};
H A Dylong_runtime_tcp_fd_limit.rs16 use ylong_runtime::net::TcpListener;
/commonlibrary/rust/ylong_http/ylong_http_client/src/async_impl/interceptor/
H A Dmod.rs16 use std::net::SocketAddr;
/commonlibrary/rust/ylong_runtime/ylong_runtime/benches/
H A Dylong_tokio_tcp.rs133 use std::net::SocketAddr;
137 use tokio::net::{TcpListener as tokioTcpListener, TcpStream as tokioTcpStream};
139 use ylong_runtime::net::{TcpListener, TcpStream};

Completed in 9 milliseconds

123