/** * FUNCTION NAME: checkMessages * * DESCRIPTION: Check messages in the queue and call the respective message handler */ void MP1Node::checkMessages() { void *ptr; int size; // Pop waiting messages from memberNode's mp1q while ( !memberNode->mp1q.empty() ) {//kiem tra hang doi co du lieu hay ko. ptr = memberNode->mp1q.front().elt;//lay tung phan tu trong hang doi. size = memberNode->mp1q.front().size;//lay kich thuoc memberNode->mp1q.pop(); recvCallBack((void *)memberNode, (char *)ptr, size); } return; }
/** * FUNCTION NAME: checkMessages * * DESCRIPTION: Check messages in the queue and call the respective message handler */ void MP1Node::checkMessages() { void *ptr; int size; // Pop waiting messages from memberNode's mp1q while ( !memberNode->mp1q.empty() ) { ptr = memberNode->mp1q.front().elt; size = memberNode->mp1q.front().size; memberNode->mp1q.pop(); recvCallBack((void *)memberNode, (char *)ptr, size); } return; }