Add public function for sorting recv_msg_buf