The standard library Socket_Junk api defines additional convenience functions on sockets, beyond those defined in Socket__Premicrothread.
The Socket_Junk api is implemented by the socket_junk package.
The Socket_Junk api source code is in src/lib/internet/socket-junk.api.
See also: Socket__Premicrothread.
See also: Socket.
The above information is manually maintained and may contain errors.
api { Port = PORT_NUMBER Int | SERV_NAME String; Hostname = HOST_ADDRESS ?.dns_host_lookupinternal::Internet_Address | HOST_NAME String; scan_addr : number_string::Reader((Char, X)) -> number_string::Reader(({host:Hostname, port:Null_Or(Port )}, X)); addr_from_string : String -> Null_Or({host:Hostname, port:Null_Or(Port )} ); exception BAD_ADDRESS String; resolve_addr : {host:Hostname, port:Null_Or(Port )} -> {address:?.dns_host_lookupinternal::Internet_Address, host:String, port:Null_Or(Int )}; Stream_Socket X = Int((_, _)); connect_client_to_internet_domain_stream_socket : {address:?.dns_host_lookupinternal::Internet_Address, port:Int} -> Stream_Socket(internet_socket__premicrothread::Inet ); receive_vector : (Stream_Socket(X ) , Int) -> vector_of_one_byte_unts::Vector; receive_string : (Stream_Socket(X ) , Int) -> String; send_vector : (Stream_Socket(X ) , vector_of_one_byte_unts::Vector) -> Void; send_string : (Stream_Socket(X ) , String) -> Void; send_rw_vector : (Stream_Socket(X ) , rw_vector_of_one_byte_unts::Rw_Vector) -> Void;};