glisten/tcp
Functions
pub fn accept_timeout(
socket: ListenSocket,
timeout: Int,
) -> Result(Socket, SocketReason)
pub fn controlling_process(
socket: Socket,
pid: Pid,
) -> Result(Nil, Atom)
pub fn do_shutdown(
socket: Socket,
write: Atom,
) -> Result(Nil, SocketReason)
pub fn get_socket_opts(
socket: Socket,
opts: List(Atom),
) -> Result(List(#(Atom, Dynamic)), Nil)
pub fn listen(
port: Int,
opts: List(TcpOption),
) -> Result(ListenSocket, SocketReason)
Start listening over TCP on a port with the given options
pub fn negotiated_protocol(socket: Socket) -> a
pub fn receive_timeout(
socket: Socket,
length: Int,
timeout: Int,
) -> Result(BitArray, SocketReason)
pub fn set_opts(
socket: Socket,
opts: List(TcpOption),
) -> Result(Nil, Nil)
Update the optons for a socket (mutates the socket)
pub fn socket_info(socket: Socket) -> Dict(a, b)