package affect
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=b328f6696e60c489da8cc2e8fad0537ca6634a39fc0c5de5840d4f98561f110617ef79ba8285ee8427dd99908c6b3d39114973598cddc5ded91abcce3b91b9a6
doc/affect.tmp/Net/index.html
Module NetSource
Networking.
Warning. This interface is expected to move back to the more library, it will no longer be distributed by this library in the future.
Endpoints
Connections
Network connections.
val with_connection :
?nonblock:bool ->
?socket_type:Unix.socket_type ->
peer:Endpoint.t ->
(Connection.t -> 'a) ->
('a, string) resultwith_connection ~peer f open a connection to peer, invokes f with the connection and makes sure it is properly closed when f returns with a value or an exception. See Connection.open' for details about the arguments.
val try_with_connection :
?nonblock:bool ->
?socket_type:Unix.socket_type ->
peer:Endpoint.t ->
(Connection.t -> 'a) ->
('a option, string) resulttry_with_connection is like with_connection but uses Connection.try_open to open the connection.
with_connection_close c f invokes with c and makes sure it is properly closed when f returns with a value or an exception.
Listeners
val with_listener :
?nonblock:bool ->
?socket_type:Unix.socket_type ->
?backlog:int ->
on:Endpoint.t ->
(Listener.t -> 'a) ->
('a, string) resultwith_listener ~on f opens a listener on endpoint on, invokes f with the listener and makes sure it is properly closed when f returns with a value or an exception. See Listener.open' for details about the arguments.
Messaging
Formatters
pp_sock_addr formats socket addresses for inspection.
pp_socket_type formats socket types for inspection.