I wrote client/server networking code for my block game using UDP. It's written for state synchronization, so the simulation runs on both the client and server. This was the first time I wrote networking code doing this, so I'm still not 100% sure I did it right. My network channel implementation doesn't handle reliable sending over UDP. Everything is unreliable. It also doesn't fragment large packets. Right now, my individual object updates are never larger than my 1024 byte payload max per packet. For more info about this project, see: https://daedlab.com/