Networking was the most straightforward part actually. You run the real client and then point it at your server, and use a packet sniffer to capture everything.