[erlang-questions] 1st day of Erlang: what is wrong with this code

avinash D'silva <>
Sun Jul 12 10:40:33 CEST 2015


loop(Socket) ->
case gen_tcp:recv(Socket, 0) of
{ok, Data} ->
gen_tcp:send(Socket, string:to_upper(Data)),
loop(Socket);
{error, closed} ->
ok
end.

I get an error for string:to_upper()

I am trying to create a simple echo server that converts text to upper case.

original code: http://20bits.com/article/network-programming-in-erlang/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150712/81eb1b92/attachment.html>


More information about the erlang-questions mailing list