#include "dnxSrvProt.h"
#include "dnxXml.h"
#include "dnxError.h"
#include "dnxDebug.h"
#include <assert.h>
#include <string.h>
Go to the source code of this file.
Functions | |
int | dnxSendJob (DnxChannel *channel, DnxJob *pJob, char *address) |
Dispatch a job to a client node (server). | |
int | dnxWaitForNodeRequest (DnxChannel *channel, DnxNodeRequest *pReg, char *address, int timeout) |
Wait for a node request (server). | |
int | dnxWaitForResult (DnxChannel *channel, DnxResult *pResult, char *address, int timeout) |
Collect job results from a client (server). |
Definition in file dnxSrvProt.c.
int dnxSendJob | ( | DnxChannel * | channel, | |
DnxJob * | pJob, | |||
char * | address | |||
) |
Dispatch a job to a client node (server).
[in] | channel | - the channel on which to send pJob . |
[in] | pJob | - the job request to be sent on channel . |
[in] | address | - the address to which pJob should be sent. This parameter is optional, and may be specified as NULL, in which case the channel address will be used. |
Definition at line 48 of file dnxSrvProt.c.
References DnxXmlBuf::buf, DnxJob::cmd, DNX_XML_INT, DNX_XML_STR, DNX_XML_XID, dnxDebug(), dnxPut(), dnxXmlAdd(), dnxXmlClose(), dnxXmlOpen(), DnxJob::priority, DnxXmlBuf::size, DnxJob::state, DnxJob::timeout, and DnxJob::xid.
int dnxWaitForNodeRequest | ( | DnxChannel * | channel, | |
DnxNodeRequest * | pReg, | |||
char * | address, | |||
int | timeout | |||
) |
Wait for a node request (server).
[in] | channel | - the channel from which to receive the node request. |
[out] | pReg | - the address of storage into which the request should be read from channel . |
[out] | address | - the address of storage in which to return the address of the sender. This parameter is optional and may be passed as NULL. If non-NULL, it should be large enough to store sockaddr_* data. |
[in] | timeout | - the maximum number of seconds the caller is willing to wait before accepting a timeout error. |
Definition at line 85 of file dnxSrvProt.c.
References DnxNodeRequest::addrstr, DnxXmlBuf::buf, DNX_OK, DNX_XML_INT, DNX_XML_XID, dnxDebug(), dnxGet(), dnxNtop(), dnxXmlCmpStr(), dnxXmlGet(), DnxNodeRequest::jobCap, DnxNodeRequest::reqType, DnxXmlBuf::size, DnxNodeRequest::ttl, and DnxNodeRequest::xid.
int dnxWaitForResult | ( | DnxChannel * | channel, | |
DnxResult * | pResult, | |||
char * | address, | |||
int | timeout | |||
) |
Collect job results from a client (server).
[in] | channel | - the channel from which to receive the job result. |
[out] | pResult | - the address of storage into which the job result should be read from channel . |
[out] | address | - the address of storage in which to return the address of the sender. This parameter is optional and may be passed as NULL. If non-NULL, it should be large enough to store sockaddr_* data. |
[in] | timeout | - the maximum number of seconds the caller is willing to wait before accepting a timeout error. |
Definition at line 147 of file dnxSrvProt.c.
References DnxXmlBuf::buf, DnxResult::delta, DNX_OK, DNX_XML_INT, DNX_XML_STR, DNX_XML_UINT, DNX_XML_XID, dnxDebug(), dnxGet(), dnxXmlCmpStr(), dnxXmlGet(), DnxResult::resCode, DnxResult::resData, DnxXmlBuf::size, DnxResult::state, and DnxResult::xid.