xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XrdNetMsg Class Reference

#include <XrdNetMsg.hh>

Collaboration diagram for XrdNetMsg:
Collaboration graph
[legend]

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. More...
 

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

XrdSysErroreDest
 
XrdNetAddr dfltDest
 
XrdNetAddr specDest
 
int destOK
 
int FD
 

Constructor & Destructor Documentation

XrdNetMsg::XrdNetMsg ( XrdSysError erp,
const char *  dest = 0,
bool *  aOK = 0 
)

Constructor

Parameters
erpThe error message object for routing error messages.
aOKIf supplied, set to true upon success; false otherwise.
destThe 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,
const char *  theDest 
)
protected
int XrdNetMsg::retErr ( int  ecode,
XrdNetAddr theDest 
)
protected
int XrdNetMsg::Send ( const char *  buff,
int  blen = 0,
const char *  dest = 0,
int  tmo = -1 
)

Send a UDP message to an endpoint.

Parameters
buffThe data to send.
blenLength of the data in buff. If not specified, the length is computed as strlen(buff).
destThe endpint name which can be host:port or a named socket. If dest is zero, uses dest specified in the constructor.
timeoutmaximum 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 occurred.
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
iovThe vector of data to send. Total amount be <= 4096 bytes.
iovcntThe number of elements in the vector.
destThe endpint name which can be host:port or a named socket. If dest is zero, uses dest specified in the constructor.
timeoutmaximum 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 occurred.

Member Data Documentation

int XrdNetMsg::destOK
protected
XrdNetAddr XrdNetMsg::dfltDest
protected
XrdSysError* XrdNetMsg::eDest
protected
int XrdNetMsg::FD
protected

Referenced by ~XrdNetMsg().

XrdNetAddr XrdNetMsg::specDest
protected

The documentation for this class was generated from the following file: