[erlang-questions] line_delimiter option in gen_tcp

Leonard B leonard.boyce@REDACTED
Thu Oct 17 18:59:09 CEST 2019

Hi Pete,

Maybe you're looking for inet:set_opts/2 ?


On Thu, Oct 17, 2019 at 11:51 AM Peter Devoy <peter.devoy@REDACTED> wrote:

> Hi list
> TL;DR: can gen_tcp packets be terminated by null byte?
> A few years ago I was looking at erlang for a pet project -- an XML socket
> server for an old multiplayer Flash game.
> The XML packets are terminated by null bytes and I swear I had gen_tcp
> configured and working with {packet, line} and {line_delimiter, \00}.
> Only now I can't find the code and gen_tcp does not appear to have a
> documented or undocumented line_delimiter option. I can only find that
> option referenced in inet.
> Am I imagening the whole thing? Is there some way to achieve packet
> delimitation by null byte using gen_tcp?
> I am an erlang noob so any help would be much appreciated!
> Cheers
> Pete
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20191017/8f5887e6/attachment.htm>

More information about the erlang-questions mailing list