/* * TODO: merge with _direct_new_msg as they have nearly similar functionality * This one is part of I/O header. */ static void _direct_new_msg(void *_hdr, Buf buf) { pmixp_base_hdr_t *hdr = (pmixp_base_hdr_t*)_hdr; if (hdr->ext_flag) { /* Extra information was incorporated into this message. * This should be an endpoint data */ _process_extended_hdr(hdr, buf); } _process_server_request(hdr, buf); }
/* * See process_handler_t prototype description * on the details of this function output values */ static void _slurm_new_msg(pmixp_conn_t *conn, void *_hdr, void *msg) { pmixp_slurm_rhdr_t *hdr = (pmixp_slurm_rhdr_t *)_hdr; Buf buf_msg = create_buf(msg, hdr->shdr.msgsize); if (hdr->shdr.ext_flag ) { /* Extra information was incorporated into this message. * This should be an endpoint data */ _process_extended_hdr(&hdr->shdr, buf_msg); } _process_server_request(&hdr->shdr, buf_msg); }
/* this routine tries to complete message processing on message * engine (me). Return value: * - 0: no progress was observed on the descriptor * - 1: one more message was successfuly processed * - 2: all messages are completed */ static int _process_message(pmixp_io_engine_t *me) { int ret = 0; pmix_io_rcvd(me); if (pmix_io_rcvd_ready(me)) { recv_header_t hdr; void *msg = pmix_io_rcvd_extract(me, &hdr); _process_server_request(&hdr, msg); ret = 1; } if (pmix_io_finalized(me)) { ret = 2; } return ret; }
/* * See process_handler_t prototype description * on the details of this function output values */ static void _direct_new_msg_conn(pmixp_conn_t *conn, void *_hdr, void *msg) { pmixp_base_hdr_t *hdr = (pmixp_base_hdr_t*)_hdr; Buf buf = create_buf(msg, hdr->msgsize); _process_server_request(hdr, buf); }