Rewrite client and server network handling