[erlang-bugs] gen_tcp:accept manual Erlang/OTP R12B suggestion

Johan Montelius <>
Wed Apr 16 10:03:39 CEST 2008


8<----------------------------------
accept(ListenSocket) -> {ok, Socket} | {error, Reason}
accept(ListenSocket, Timeout) -> {ok, Socket} | {error, Reason}

Types:

ListenSocket -- see listen/2
Timeout = int() | infinity
Socket = socket()
Reason = closed | timeout | posix()

Accepts an incoming connection request on a listen socket. Socket must be  
a socket returned from listen/2. Timeout specifies a timeout value in ms,  
defaults to infinity.
8<---------------------------------

"Socket must be a ...."  should be "ListenSocket must be .."      or one a  
could write:

accept(Listen) -> {ok, Socket} | {error, Reason}
    :

and then write "Listen must be a ...".


  Johan
-- 
KTH ICT
Johan Montelius



More information about the erlang-bugs mailing list