[erlang-questions] Bad value on output port 'tcp_inet'
James Cone
jcone@REDACTED
Fri Oct 5 09:22:30 CEST 2007
In my case, it was an integer. I found out when I captured the error
and printed the data, so your advice was helpful.
I had a list of strings, and tried to send them one at a time, but the
last one was a list of integers, so I didn't realise I was fully un-nested.
There's been some discussion in an ejabberd context, of having a
separate string type. I think this mistake of mine is another reason
for having one, and also that I get *lots* of situations where io:format
guesses wrongly and I get a list of integers that I don't want.
Claes Wikstrom wrote:
> Chandru wrote:
>
>>
>> This is most probably because you are sending something other than a
>> (deep) list of integers or binaries. Check the data you are trying to
>> send down the socket.
>>
>
> Typically atoms,
>
> is in for example:
>
> gen_tcp:send(Socket, [Bin1, "foo", some_atom, Bin2]).
>
> /klacke
More information about the erlang-questions
mailing list