Add the function to judge the send/rcv action.