![]() |
XRootD
|
#include <XrdNetMsg.hh>
Public Member Functions | |
XrdNetMsg (XrdSysError *erp, const char *dest=0, bool *aOK=0) | |
~XrdNetMsg () | |
Destructor. More... | |
int | Send (const char *buff, int blen=0, const char *dest=0, int tmo=-1) |
int | Send (const char *dest, const XrdNetSockAddr &netSA, const char *buff, int blen=0, int tmo=-1) |
int | Send (const struct iovec iov[], int iovcnt, const char *dest=0, int tmo=-1) |
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 | |
int | destOK |
XrdNetAddr | dfltDest |
XrdSysError * | eDest |
int | FD |
XrdNetAddr | specDest |
Definition at line 49 of file XrdNetMsg.hh.
XrdNetMsg::XrdNetMsg | ( | XrdSysError * | erp, |
const char * | dest = 0 , |
||
bool * | aOK = 0 |
||
) |
Constructor
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. |
Definition at line 44 of file XrdNetMsg.cc.
References destOK, dfltDest, eDest, XrdSysError::Emsg(), FD, XrdNet::Relay(), and XrdNetAddr::Set().
|
inline |
|
protected |
Definition at line 144 of file XrdNetMsg.cc.
References eDest, XrdSysError::Emsg(), and FD.
Referenced by Send().
|
protected |
Definition at line 163 of file XrdNetMsg.cc.
References destOK, dfltDest, eDest, XrdSysError::Emsg(), and XrdNetAddrInfo::Name().
Referenced by retErr(), and Send().
|
protected |
Definition at line 174 of file XrdNetMsg.cc.
References XrdNetAddrInfo::Name(), and retErr().
int XrdNetMsg::Send | ( | const char * | buff, |
int | blen = 0 , |
||
const char * | dest = 0 , |
||
int | tmo = -1 |
||
) |
Send a UDP message to an endpoint.
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. |
tmo | maximum seconds to wait for a idle socket. When negative, the default, no time limit applies. |
Definition at line 70 of file XrdNetMsg.cc.
References destOK, dfltDest, eDest, XrdSysError::Emsg(), FD, OK2Send(), retErr(), XrdNetAddr::Set(), XrdNetAddrInfo::SockAddr(), XrdNetAddrInfo::SockSize(), Sokdata_t, and specDest.
Referenced by XrdXrootdGSReal::GetDictID(), XrdXrootdGSReal::Ident(), XrdCmsPrepare::Inform(), XrdFrcReqAgent::Ping(), XrdStats::Report(), Send(), and XrdXrootdMonitor::Send().
int XrdNetMsg::Send | ( | const char * | dest, |
const XrdNetSockAddr & | netSA, | ||
const char * | buff, | ||
int | blen = 0 , |
||
int | tmo = -1 |
||
) |
Send a UDP message to an endpoint.
buff | The data to send. |
blen | Length of the data in buff. If not specified, the length is computed as strlen(buff). |
dest | The endpoint in the form as in "host:port". |
netSA | The endpoint address. This overrides the constructor. |
tmo | maximum seconds to wait for a idle socket. When negative, the default, no time limit applies. |
Definition at line 97 of file XrdNetMsg.cc.
References XrdNetSockAddr::Addr, FD, OK2Send(), Sokdata_t, XrdNetSockAddr::v4, and XrdNetSockAddr::v6.
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.
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. |
tmo | maximum seconds to wait for a idle socket. When negative, the default, no time limit applies. |
Definition at line 119 of file XrdNetMsg.cc.
References OK2Send(), retErr(), and Send().
|
protected |
Definition at line 140 of file XrdNetMsg.hh.
Referenced by XrdNetMsg(), retErr(), and Send().
|
protected |
Definition at line 138 of file XrdNetMsg.hh.
Referenced by XrdNetMsg(), retErr(), and Send().
|
protected |
Definition at line 137 of file XrdNetMsg.hh.
Referenced by XrdNetMsg(), OK2Send(), retErr(), and Send().
|
protected |
Definition at line 141 of file XrdNetMsg.hh.
Referenced by XrdNetMsg(), ~XrdNetMsg(), OK2Send(), and Send().
|
protected |
Definition at line 139 of file XrdNetMsg.hh.
Referenced by Send().