add Network

This class  keep things common to both the client and server.