add a thread to monitor the recv message.