I made a proxy for a random online game and learned a lot. Didn't really play it much but I always wanted to make some kind of bot. I made the game connect to a local port then erlang spawns the real connection and serves as a middleman between all incoming and outgoing packets. Basically one spawn is listening for local connections, if someone connects it spawns a node receiving all client data and a node connected to the actual server, receiving all server data. The server/client nodes have each other Pid's and talk to each other. I guess I could have one node as the controlling process for both sockets but making spawns in erlang is cheap and easier to organize at times. Parsing the data made me get really good at bit syntax and made me appreciate how powerful the language is. After erlang you won't want to have to mess with binary any other way. Depending on the packets different functions were called to parse different codes. Spawning the parse functions is necessary to not stall the receive loop, and if they want to send a customized packet they just send a message to the server node. Pretty soon I could make an army of bots that marched in unison chanting stuff came together to depict asteroid sprites.
Joe's book really helped most. I'd flip through at night. Programming erlang I bought as an ebook and I could never really tolerate reading it too long on the monitor. The manning OTP book sucks.