![]() |
XRootD
|
#include <XrdOucStream.hh>
Public Member Functions | |
XrdOucStream (XrdSysError *erobj=0, const char *ifname=0, XrdOucEnv *anEnv=0, const char *Pfx=0) | |
~XrdOucStream () | |
int | Attach (int FileDescriptor, int bsz=2047) |
int | AttachIO (int infd, int outfd, int bsz=2047) |
void | Close (int hold=0) |
int | Detach () |
int | Drain () |
void | Echo () |
void | Echo (bool capture) |
int | Exec (char **, int inrd=0, int efd=0) |
int | Exec (const char *, int inrd=0, int efd=0) |
int | FDNum () |
int | FENum () |
void | Flush () |
char * | GetFirstWord (int lowcase=0) |
char * | GetLine () |
char * | GetMyFirstWord (int lowcase=0) |
int | GetRest (char *theBuf, int Blen, int lowcase=0) |
char * | GetToken (char **rest, int lowcase=0) |
char * | GetToken (int lowcase=0) |
char * | GetWord (int lowcase=0) |
int | isAlive () |
int | LastError () |
char * | LastLine () |
int | noEcho () |
int | Put (const char *data) |
int | Put (const char *data, const int dlen) |
int | Put (const char *data[], const int dlen[]) |
int | PutLine (const char *data, int dlen=0) |
void | RetToken () |
XrdOucEnv * | SetEnv (XrdOucEnv *newEnv) |
void | SetEroute (XrdSysError *eroute) |
void | Tabs (int x=1) |
int | Wait4Data (int msMax=-1) |
Static Public Member Functions | |
static XrdOucString * | Capture () |
static void | Capture (const char **cVec=0, bool linefeed=true) |
static XrdOucString * | Capture (XrdOucString *cfObj) |
Definition at line 46 of file XrdOucStream.hh.
XrdOucStream::XrdOucStream | ( | XrdSysError * | erobj = 0 , |
const char * | ifname = 0 , |
||
XrdOucEnv * | anEnv = 0 , |
||
const char * | Pfx = 0 |
||
) |
Definition at line 187 of file XrdOucStream.cc.
References StreamInfo::myExec, StreamInfo::myHost, and StreamInfo::myName.
|
inline |
Definition at line 57 of file XrdOucStream.hh.
References Close().
int XrdOucStream::Attach | ( | int | FileDescriptor, |
int | bsz = 2047 |
||
) |
Definition at line 252 of file XrdOucStream.cc.
Referenced by AttachIO(), Macaroons::Handler::Config(), XrdSsiSfsConfig::Configure(), XrdVomsMapfile::Configure(), Exec(), XrdFrcCID::Init(), main(), XrdOssCache::MapDevs(), XrdAccAuthFile::Open(), XrdFrmXfrDaemon::Pong(), PutLine(), XrdOfsEvr::recvEvents(), and XrdFrmXfrAgent::Start().
int XrdOucStream::AttachIO | ( | int | infd, |
int | outfd, | ||
int | bsz = 2047 |
||
) |
Definition at line 245 of file XrdOucStream.cc.
References Attach().
Referenced by XrdXrootdAdmin::Login().
|
static |
Definition at line 314 of file XrdOucStream.cc.
|
static |
Definition at line 290 of file XrdOucStream.cc.
References XrdOucString::append().
Referenced by Macaroons::Handler::Config(), and XrdSsiSfsConfig::Configure().
|
static |
Definition at line 305 of file XrdOucStream.cc.
void XrdOucStream::Close | ( | int | hold = 0 | ) |
Definition at line 323 of file XrdOucStream.cc.
References close, Drain(), and XrdSysError::Say().
Referenced by XrdOfsEvr::~XrdOfsEvr(), ~XrdOucStream(), XrdCmsFinderTRG::Added(), Attach(), XrdAccAuthFile::Close(), XrdSsiSfsConfig::Configure(), XrdFrcCID::Init(), XrdCmsFinderTRG::PutInfo(), XrdCmsFinderTRG::Removed(), XrdCmsFinderTRG::Resume(), XrdCmsFinderTRG::Start(), and XrdCmsFinderTRG::Suspend().
|
inline |
Definition at line 76 of file XrdOucStream.hh.
int XrdOucStream::Drain | ( | ) |
Definition at line 367 of file XrdOucStream.cc.
Referenced by XrdOfsTPCProg::Cancel(), Close(), XrdCmsMeter::Report(), and XrdOucProg::RunDone().
void XrdOucStream::Echo | ( | ) |
Definition at line 393 of file XrdOucStream.cc.
References XrdSysError::Say().
Referenced by Macaroons::Handler::Config(), XrdSsiSfsConfig::Configure(), XrdCmsConfig::ConfigXeq(), and GetMyFirstWord().
void XrdOucStream::Echo | ( | bool | capture | ) |
Definition at line 406 of file XrdOucStream.cc.
References XrdSysError::Say().
int XrdOucStream::Exec | ( | char ** | parm, |
int | inrd = 0 , |
||
int | efd = 0 |
||
) |
Definition at line 447 of file XrdOucStream.cc.
References Attach(), close, XrdProxy::envP, Err, Erx, Exec(), fcntl(), XrdOucEnv::GetPtr(), XrdSysError::logger(), and XrdSysLogger::originalFD().
int XrdOucStream::Exec | ( | const char * | theCmd, |
int | inrd = 0 , |
||
int | efd = 0 |
||
) |
Definition at line 419 of file XrdOucStream.cc.
References MaxARGC.
Referenced by Exec(), XrdCmsMeter::Run(), and XrdOucProg::Run().
|
inline |
Definition at line 110 of file XrdOucStream.hh.
Referenced by XrdCmsFinderTRG::Start().
|
inline |
Definition at line 111 of file XrdOucStream.hh.
|
inline |
Definition at line 115 of file XrdOucStream.hh.
References fsync().
char * XrdOucStream::GetFirstWord | ( | int | lowcase = 0 | ) |
Definition at line 677 of file XrdOucStream.cc.
References GetWord(), and SetEnv().
Referenced by GetMyFirstWord().
char * XrdOucStream::GetLine | ( | ) |
Definition at line 551 of file XrdOucStream.cc.
References Erp, read(), and XrdOucStream_EOM.
Referenced by XrdXrootdJob2Do::DoIt(), GetWord(), XrdFrcCID::Init(), XrdXrootdAdmin::Login(), main(), XrdOssCache::MapDevs(), XrdOssSys::MSS_Readdir(), XrdOssSys::MSS_Xeq(), XrdFrmXfrDaemon::Pong(), XrdOfsEvr::recvEvents(), XrdCmsMeter::Run(), XrdOucProg::Run(), XrdOfsPrepGPIReal::PrepGRun::Run(), XrdFrmXfrAgent::Start(), and XrdOfsTPCProg::Xeq().
char * XrdOucStream::GetMyFirstWord | ( | int | lowcase = 0 | ) |
Definition at line 694 of file XrdOucStream.cc.
References Echo(), XrdSysError::Emsg(), and GetFirstWord().
Referenced by Macaroons::Handler::Config(), and XrdVomsMapfile::Configure().
int XrdOucStream::GetRest | ( | char * | theBuf, |
int | Blen, | ||
int | lowcase = 0 |
||
) |
Definition at line 807 of file XrdOucStream.cc.
References GetWord().
char * XrdOucStream::GetToken | ( | char ** | rest, |
int | lowcase = 0 |
||
) |
Definition at line 654 of file XrdOucStream.cc.
References GetToken().
char * XrdOucStream::GetToken | ( | int | lowcase = 0 | ) |
Definition at line 629 of file XrdOucStream.cc.
Referenced by GetToken(), GetWord(), XrdXrootdAdmin::Login(), main(), XrdOssCache::MapDevs(), XrdFrmXfrDaemon::Pong(), XrdFrmXfrAgent::Process(), and XrdOfsEvr::recvEvents().
char * XrdOucStream::GetWord | ( | int | lowcase = 0 | ) |
Definition at line 743 of file XrdOucStream.cc.
References StreamInfo::fcList, GetLine(), GetToken(), StreamInfo::itFC, and XrdOucStream_EOM.
Referenced by XrdVomsMapfile::Configure(), GetFirstWord(), XrdAccAuthFile::getID(), XrdAccAuthFile::getPP(), XrdAccAuthFile::getRec(), GetRest(), XrdCmsUtils::ParseManPort(), and xonmissing().
|
inline |
Definition at line 156 of file XrdOucStream.hh.
Referenced by XrdCmsPrepare::Add(), XrdCmsPrepare::Del(), and XrdOucProg::Feed().
|
inline |
Definition at line 163 of file XrdOucStream.hh.
Referenced by XrdSsiSfsConfig::Configure(), XrdOucProg::Feed(), XrdFrcCID::Init(), XrdOssSys::MSS_Readdir(), XrdAccAuthFile::Open(), and XrdOucProg::Run().
|
inline |
Definition at line 167 of file XrdOucStream.hh.
|
inline |
Definition at line 171 of file XrdOucStream.hh.
|
inline |
Definition at line 177 of file XrdOucStream.hh.
References Put().
Referenced by Put().
int XrdOucStream::Put | ( | const char * | data, |
const int | dlen | ||
) |
Definition at line 859 of file XrdOucStream.cc.
References Erp, write(), and XrdOucStream_BUSY.
Referenced by XrdCmsPrepare::Add(), XrdCmsFinderTRG::Added(), XrdCmsPrepare::Del(), XrdOucProg::Feed(), Put(), XrdCmsFinderTRG::PutInfo(), XrdCmsFinderTRG::Removed(), XrdCmsFinderTRG::Resume(), XrdOucERoute::Route(), XrdCmsFinderTRG::Start(), and XrdCmsFinderTRG::Suspend().
int XrdOucStream::Put | ( | const char * | data[], |
const int | dlen[] | ||
) |
Definition at line 877 of file XrdOucStream.cc.
References Erp, Put(), write(), and XrdOucStream_BUSY.
int XrdOucStream::PutLine | ( | const char * | data, |
int | dlen = 0 |
||
) |
Definition at line 903 of file XrdOucStream.cc.
References Attach(), Erq, and XrdOucStream_EOM.
void XrdOucStream::RetToken | ( | ) |
Definition at line 833 of file XrdOucStream.cc.
Definition at line 191 of file XrdOucStream.hh.
Referenced by GetFirstWord(), and XrdOucProg::Run().
|
inline |
Definition at line 196 of file XrdOucStream.hh.
Referenced by XrdXrootdAdmin::Login(), and XrdAccAuthFile::Open().
|
inline |
Definition at line 201 of file XrdOucStream.hh.
Referenced by XrdAccAuthFile::Open().
int XrdOucStream::Wait4Data | ( | int | msMax = -1 | ) |
Definition at line 941 of file XrdOucStream.cc.
Referenced by XrdOssSys::MSS_Xeq().