[−][src]Struct tcpserver::TCPPeer
Fields
addr: SocketAddr
reader: OwnedReadHalf
sender: Sender<XBWrite>
Implementations
impl TCPPeer
[src]
pub fn new(
addr: SocketAddr,
reader: OwnedReadHalf,
sender: Sender<XBWrite>
) -> TCPPeer
[src]
addr: SocketAddr,
reader: OwnedReadHalf,
sender: Sender<XBWrite>
) -> TCPPeer
创建一个TCP PEER
pub fn get_sender(&self) -> Sender<XBWrite>
[src]
获取发送句柄
pub async fn send<'_>(&'_ self, buff: XBWrite) -> Result<(), Box<dyn Error>>
[src]
发送
pub async fn send_mut<'_>(
&'_ mut self,
buff: XBWrite
) -> Result<(), Box<dyn Error>>
[src]
&'_ mut self,
buff: XBWrite
) -> Result<(), Box<dyn Error>>
发送 mut 版
pub async fn disconnect<'_>(&'_ mut self) -> Result<(), Box<dyn Error>>
[src]
掐线
Auto Trait Implementations
impl !RefUnwindSafe for TCPPeer
impl Send for TCPPeer
impl Sync for TCPPeer
impl Unpin for TCPPeer
impl !UnwindSafe for TCPPeer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,