
13 Sep
2005
13 Sep
'05
11:49 a.m.
On 28 August 2005 20:00, Joel Reymont wrote:
I get a message from Erlang once data arrives over TCP and the message is a {tcp, Socket, Bin} tuple where Bin is binary data. I can easily extract what I need using Erlang binary pattern matching:
read(<<24, GID:32, Seq:16>>) -> {24, GID, Seq}.
I didn't see anyone mention this (apologies if I missed it), but the House project does parsing of network packets and has some useful combinators for parsing binary data: http://www.cse.ogi.edu/~hallgren/House/ Cheers, Simon