XrdNetMsg Class Reference
#include <XrdNetMsg.hh>
List of all members.
Public Member Functions |
int | Send (const char *buff, int blen=0, const char *dest=0, int tmo=-1) |
int | Send (const struct iovec iov[], int iovcnt, const char *dest=0, int tmo=-1) |
| XrdNetMsg (XrdSysError *erp, const char *dest=0, bool *aOK=0) |
| ~XrdNetMsg () |
| Destructor.
|
Protected Member Functions |
int | OK2Send (int timeout, const char *dest) |
int | retErr (int ecode, const char *theDest) |
int | retErr (int ecode, XrdNetAddr *theDest) |
Protected Attributes |
XrdSysError * | eDest |
XrdNetAddr | dfltDest |
XrdNetAddr | specDest |
int | destOK |
int | FD |
Constructor & Destructor Documentation
XrdNetMsg::XrdNetMsg |
( |
XrdSysError * |
erp, |
|
|
const char * |
dest = 0 , |
|
|
bool * |
aOK = 0 | |
|
) |
| | |
Constructor
- Parameters:
-
| erp | The error message object for routing error messages. |
| aOK | If supplied, set to true upon success; false otherwise. |
| dest | The endpint name which can be host:port or a named socket. This becomes the default endpoint. Any specified endpoint to send must be in the same family (e.g. UNIX). If not specified, then an endpoint must always be specified with send and is restricted to be in the INET family. |
XrdNetMsg::~XrdNetMsg |
( |
|
) |
[inline] |
Destructor.
References close, and FD.
Member Function Documentation
int XrdNetMsg::OK2Send |
( |
int |
timeout, |
|
|
const char * |
dest | |
|
) |
| | [protected] |
int XrdNetMsg::retErr |
( |
int |
ecode, |
|
|
XrdNetAddr * |
theDest | |
|
) |
| | [protected] |
int XrdNetMsg::retErr |
( |
int |
ecode, |
|
|
const char * |
theDest | |
|
) |
| | [protected] |
int XrdNetMsg::Send |
( |
const struct iovec |
iov[], |
|
|
int |
iovcnt, |
|
|
const char * |
dest = 0 , |
|
|
int |
tmo = -1 | |
|
) |
| | |
Send a UDP message to an endpoint using an I/O vector.
- Parameters:
-
| iov | The vector of data to send. Total amount be <= 4096 bytes. |
| iovcnt | The number of elements in the vector. |
| dest | The endpint name which can be host:port or a named socket. If dest is zero, uses dest specified in the constructor. |
| timeout | maximum seconds to wait for a idle socket. When negative, the default, no time limit applies. |
- Returns:
- <0 Message not sent due to error.
-
=0 Message send (well as defined by UDP)
-
>0 Message not sent, timeout occured.
int XrdNetMsg::Send |
( |
const char * |
buff, |
|
|
int |
blen = 0 , |
|
|
const char * |
dest = 0 , |
|
|
int |
tmo = -1 | |
|
) |
| | |
Send a UDP message to an endpoint.
- Parameters:
-
| buff | The data to send. |
| blen | Length of the data in buff. If not specified, the length is computed as strlen(buff). |
| dest | The endpint name which can be host:port or a named socket. If dest is zero, uses dest specified in the constructor. |
| timeout | maximum seconds to wait for a idle socket. When negative, the default, no time limit applies. |
- Returns:
- <0 Message not sent due to error.
-
=0 Message send (well as defined by UDP)
-
>0 Message not sent, timeout occured.
Member Data Documentation
The documentation for this class was generated from the following file: