[erlang-questions] Erlang get_tcp:recv data length
Pablo Platt
pablo.platt@REDACTED
Sat Feb 26 00:45:44 CET 2011
If you have a gen_server that holds the socket and use handle_info to fill the
buffer,
why can't you stop it or reload the code when using active:true?
________________________________
From: Max Lapshin <max.lapshin@REDACTED>
To: erlang-questions <erlang-questions@REDACTED>
Sent: Thu, February 24, 2011 10:01:36 AM
Subject: Re: Re: [erlang-questions] Erlang get_tcp:recv data length
In fact, using gen_tcp:recv is a bad idea for a "rock solid" server,
because you will not be able to stop process or reload its code.
Proper way is to inet:setops(Socket, [{active,once}]), use buffer and
use erlang:decode_packet to decode lines
________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
More information about the erlang-questions
mailing list