a simple server for sending and receiving messages