Gets the socket listening for messages