[erlang-questions] Line Receiver example?
Jarrod Roberson
jarrod@REDACTED
Mon Apr 27 21:43:19 CEST 2009
On Mon, Apr 27, 2009 at 3:23 PM, Jarrod Roberson <jarrod@REDACTED>wrote:
>
>>
>> get_line(Socket) ->
>> receive
>> {tcp, Socket, Bin} ->
>> io:format("Received Line:~p~n", binary_to_list(Bin)),
>> get_line(Socket);
>> {tcp_closed, Socket} ->
>> io:format("Connection Closed!~n")
>> end.
>>
>>
> also I don't get any output when connections are closed / disconnected by
> the client.
apparently I got the connection closed event working now, if I could just
get it to print out the received line
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090427/f62ea38f/attachment.htm>
More information about the erlang-questions
mailing list