Struct socks5_server::Server
source · [−]pub struct Server { /* private fields */ }Implementations
sourceimpl Server
impl Server
pub fn new(listener: TcpListener, auth: Arc<dyn Auth + Send + Sync>) -> Self
pub async fn bind<T: ToSocketAddrs>(
addr: T,
auth: Arc<dyn Auth + Send + Sync>
) -> Result<Self>
pub async fn accept(&self) -> Result<(IncomingConnection, SocketAddr)>
pub fn local_addr(&self) -> Result<SocketAddr>
Auto Trait Implementations
impl !RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl !UnwindSafe for Server
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more