Server and Client: change writeInt and readInt in write and read