[erlang-questions] "Bad value on output port 'tcp_inet'" for null terminated messages
Thu Sep 10 21:44:49 CEST 2009
2009/9/10 Juhani Ränkimies <juhani@REDACTED>
> ok = gen_tcp:send(Socket, "message text"),
> seems to work (the receiving end is of course confused), but
> ok = gen_tcp:send(Socket, "message text\0"),
> =ERROR REPORT==== 10-Sep-2009::20:21:21 ===
> Bad value on output port 'tcp_inet'
> Have you modified the data for the purpose of this email? There is nothing
wrong with the data you are sending in the second case.
> How can I send the trailing 0-byte?
gen_tcp:send(Socket, ["message text", 0]).
More information about the erlang-questions