[erlang-questions] misunderstanding of TCP/IP in a gen_server

Michael Santos michael.santos@REDACTED
Tue Dec 21 18:30:10 CET 2010


On Tue, Dec 21, 2010 at 05:06:07PM +0100, info wrote:
> Hello,
> I have a problem of TCP/IP understanding.
> I set the socket server like this:
> Opts = [binary, 
>              {reuseaddr, true},
>              {backlog,5}, 
>   {packet, 0},  
>   {active, false},
>              {nodelay, true}], 
> 
> and, after the listen and the accept, I do:
> 
> case gen_tcp:recv(Socket, 0) of
>         {ok, Data} ->
> 
> I monitor the TCP/IP frames and I see (client  ->  server):
> AP ->               
> <- AF 
> ->  A
> ->  AR
> 
> I don't understand why the server set the flag "F". The consequence is the reset (AR) by the client.

Difficult to say without seeing the code, but the process holding the
accepted socket is probably crashing and Erlang is closing the socket
(hence the FIN).



More information about the erlang-questions mailing list