From: Vernier -- Date: 2009-01-05T16:24:02+09:00 Subject: Coding a server Hey, I'm porting some old c++ code for a server to ruby, and I can't figure out what's the correct way of doing the network packet parsing I'm using eventmachine for the networking code but when a packet is received it must be parsed and depending on the header the packet will have one format or another, and each of these would have an associated reply format, I'm not quite sure on how to code this while keeping it clean Any ideas on how you would do this? also, in cpp I'm using structs for the packet formats, but I have no idea on how to do that in ruby -- Posted via http://www.ruby-forum.com/.