[][src]Function libp2p_core::upgrade::write_one

pub fn write_one<TSocket, TData>(
    socket: TSocket,
    data: TData
) -> WriteOne<TSocket, TData> where
    TSocket: AsyncWrite,
    TData: AsRef<[u8]>, 

Send a message to the given socket, then shuts down the writing side.

Note: Prepends a variable-length prefix indicate the length of the message. This is compatible with what read_one expects.