accept_wait
fn accept_wait(Stream listener) -> Result<Stream, IoError> Import
Source: use io::sync::{accept_wait}; src/io/sync.hy Waits for the next connection on a TCP listener and returns its stream.
Parameters#
| Name | Type |
|---|---|
listener | Stream |
Returns#
Result<Stream, IoError>
See also#
write_all: Writes all ofbuftos, waiting whenever the stream is not ready.read_exact: Fills all ofbuffroms, waiting whenever no data is ready.read_to_end: Reads fromsuntil it ends and returns everything read.recv_from_wait: Waits for a UDP datagram, reads it intobuf, and returns(bytes, sender host, sender port).send_to_wait: Sendsbufas one UDP datagram tohost:port, waiting while the socket is not ready.copy: Copies the filesrctodst.print: Writessto standard output, without a newline.println: Writessand a newline to standard output.