From 2a040cf7c0cc6415b4bb5152b58d8a98a59d6a81 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 25 Apr 2019 11:34:50 +0200 Subject: [esock|doc] Document the new asynchronous feature Document the new way to make asynchronous calls to some of the functions: accept, all recv and all send. OTP-15731 --- erts/preloaded/src/socket.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'erts/preloaded/src') diff --git a/erts/preloaded/src/socket.erl b/erts/preloaded/src/socket.erl index f4d8f175f8..59bef4b3b7 100644 --- a/erts/preloaded/src/socket.erl +++ b/erts/preloaded/src/socket.erl @@ -1359,7 +1359,7 @@ send(Socket, Data) -> Data :: iodata(), Flags :: send_flags(), Reason :: term() - ; (Socket, Data, nowait) -> ok | + ; (Socket, Data, Timeout :: nowait) -> ok | {ok, SelectInfo} | {ok, {RestData, SelectInfo}} | {error, Reason} when @@ -1488,7 +1488,7 @@ sendto(Socket, Data, Dest) -> Dest :: null | sockaddr(), Flags :: send_flags(), Reason :: term() - ; (Socket, Data, Dest, nowait) -> ok | + ; (Socket, Data, Dest, Timeout :: nowait) -> ok | {ok, SelectInfo} | {error, Reason} when Socket :: socket(), @@ -1630,7 +1630,7 @@ sendmsg(Socket, MsgHdr) -> MsgHdr :: msghdr(), Flags :: send_flags(), Reason :: term() - ; (Socket, MsgHdr, nowait) -> ok | + ; (Socket, MsgHdr, Timeout :: nowait) -> ok | {ok, SelectInfo} | {error, Reason} when Socket :: socket(), @@ -2162,7 +2162,7 @@ recvmsg(Socket) -> Flags :: recv_flags(), MsgHdr :: msghdr(), Reason :: term() - ; (Socket, nowait) -> {ok, MsgHdr} | + ; (Socket, Timeout :: nowait) -> {ok, MsgHdr} | {ok, SelectInfo} | {error, Reason} when Socket :: socket(), -- cgit v1.2.3