split network class into client and server