"Bad value on output port 'tcp_inet'" for null terminated messages

Juhani Ränkimies juhani@REDACTED
Thu Sep 10 19:45:33 CEST 2009


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'

How can I send the trailing 0-byte?

This is erl5.7.2 on XP.


More information about the erlang-questions mailing list