
28 Aug
2005
28 Aug
'05
11:08 p.m.
Alistair, Thanks alot for your examples. I still have one unanswered question... How would you read a tuple of values (24, GID, Seq) like in my Erlang example, where 24 is one byte, GID is a 4-byte integer and Seq is a 2- byte word? Is there an elegant way of specifying packet format and reading/writing Haskell data according to it? Thanks, Joel On Aug 28, 2005, at 11:58 PM, Alistair Bayley wrote:
Below is a contrived, non-optimal first attempt. The server just reads seven bytes from the socket, prints them, and quits. And the client just sends seven bytes and quits.