Complete client and server implementation