[Haskell-cafe] Haskell poker server

Bulat Ziganshin bulatz at HotPOP.com
Mon Aug 29 01:44:44 EDT 2005

Hello Joel,

Monday, August 29, 2005, 3:08:31 AM, you wrote:

JR> How would you read a tuple of values (24, GID, Seq) like in my Erlang
JR> example, where 24 is one byte, GID is a 4-byte integer and Seq is a 2- 
JR> byte word? Is there an elegant way of specifying packet format and  
JR> reading/writing Haskell data according to it?

of course - it's a various Binary packages! :)

direct way to read/write values from memory is Foreign.Storable
module, which has provision for
Int8,Int16,Int32,Int64,Word8,Word16,Word32,Word64 and other fixed-size
data formats, and Foreign.Ptr module, which supports pointer

sorry if you need more high-level package, currently we have no such

Best regards,
 Bulat                            mailto:bulatz at HotPOP.com

More information about the Haskell-Cafe mailing list