[Haskell-cafe] Haskell poker server

Simon Marlow simonmar at microsoft.com
Tue Sep 13 11:49:10 EDT 2005


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


More information about the Haskell-Cafe mailing list