server listens to messages.