TPSocket Class Reference

#include <TPSocket.h>

Inheritance diagram for TPSocket:

TSocket TSocket TNamed TNamed TNamed TNamed TObject TObject TObject TObject TObject TObject TObject TObject List of all members.

Public Member Functions

 TPSocket (TInetAddress address, const char *service, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (TInetAddress address, Int_t port, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, const char *service, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, Int_t port, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, Int_t port, Int_t size, TSocket *sock)
virtual ~TPSocket ()
void Close (Option_t *opt="")
Int_t GetDescriptor () const
TInetAddress GetLocalInetAddress ()
Int_t Send (const TMessage &mess)
Int_t Send (Int_t kind)
Int_t Send (Int_t status, Int_t kind)
Int_t Send (const char *mess, Int_t kind=kMESS_STRING)
Int_t SendRaw (const void *buffer, Int_t length, ESendRecvOptions opt)
Int_t Recv (TMessage *&mess)
Int_t Recv (Int_t &status, Int_t &kind)
Int_t Recv (char *mess, Int_t max)
Int_t Recv (char *mess, Int_t max, Int_t &kind)
Int_t RecvRaw (void *buffer, Int_t length, ESendRecvOptions opt)
Bool_t IsValid () const
Int_t GetErrorCode () const
Int_t SetOption (ESockOptions opt, Int_t val)
Int_t GetOption (ESockOptions opt, Int_t &val)
Int_t GetSize () const
 TPSocket (TInetAddress address, const char *service, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (TInetAddress address, Int_t port, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, const char *service, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, Int_t port, Int_t size, Int_t tcpwindowsize=-1)
 TPSocket (const char *host, Int_t port, Int_t size, TSocket *sock)
virtual ~TPSocket ()
void Close (Option_t *opt="")
Int_t GetDescriptor () const
TInetAddress GetLocalInetAddress ()
Int_t Send (const TMessage &mess)
Int_t Send (Int_t kind)
Int_t Send (Int_t status, Int_t kind)
Int_t Send (const char *mess, Int_t kind=kMESS_STRING)
Int_t SendRaw (const void *buffer, Int_t length, ESendRecvOptions opt)
Int_t Recv (TMessage *&mess)
Int_t Recv (Int_t &status, Int_t &kind)
Int_t Recv (char *mess, Int_t max)
Int_t Recv (char *mess, Int_t max, Int_t &kind)
Int_t RecvRaw (void *buffer, Int_t length, ESendRecvOptions opt)
Bool_t IsValid () const
Int_t GetErrorCode () const
Int_t SetOption (ESockOptions opt, Int_t val)
Int_t GetOption (ESockOptions opt, Int_t &val)
Int_t GetSize () const

Private Member Functions

 TPSocket (TSocket *pSockets[], Int_t size)
 TPSocket (const TPSocket &)
void operator= (const TPSocket &)
void Init (Int_t tcpwindowsize, TSocket *sock=0)
Option_tGetOption () const
 TPSocket (TSocket *pSockets[], Int_t size)
 TPSocket (const TPSocket &)
void operator= (const TPSocket &)
void Init (Int_t tcpwindowsize, TSocket *sock=0)
Option_tGetOption () const

Private Attributes

TSocket ** fSockets
TMonitorfWriteMonitor
TMonitorfReadMonitor
Int_t fSize
Int_tfWriteBytesLeft
Int_tfReadBytesLeft
char ** fWritePtr
char ** fReadPtr
TSocket ** fSockets
TMonitorfWriteMonitor
TMonitorfReadMonitor
Int_tfWriteBytesLeft
Int_tfReadBytesLeft
char ** fWritePtr
char ** fReadPtr

Friends

class TPServerSocket

Detailed Description

Definition at line 35 of file TPSocket.h.


Constructor & Destructor Documentation

TPSocket::TPSocket ( TSocket pSockets[],
Int_t  size 
) [private]

Definition at line 273 of file TPSocket.cxx.

References TSeqCollection::Add(), TMonitor::Add(), TMonitor::DeActivateAll(), TSocket::fAddress, fReadBytesLeft, fReadMonitor, fReadPtr, fSize, TSocket::fSocket, fSockets, fWriteBytesLeft, fWriteMonitor, fWritePtr, TSocket::GetDescriptor(), TSocket::GetInetAddress(), TROOT::GetListOfSockets(), TNamed::GetName(), TNamed::GetTitle(), gROOT, gROOTMutex, i, kNoBlock, kNoDelay, TMonitor::kRead, TMonitor::kWrite, R__LOCKGUARD2, TNamed::SetName(), SetOption(), and TNamed::SetTitle().

TPSocket::TPSocket ( const TPSocket  )  [private]

TPSocket::TPSocket ( TInetAddress  address,
const char *  service,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

TPSocket::TPSocket ( TInetAddress  address,
Int_t  port,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

Definition at line 55 of file TPSocket.cxx.

References fSize, and Init().

TPSocket::TPSocket ( const char *  host,
const char *  service,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

Definition at line 72 of file TPSocket.cxx.

References fSize, and Init().

TPSocket::TPSocket ( const char *  host,
Int_t  port,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

Definition at line 89 of file TPSocket.cxx.

References TSocket::Authenticate(), TSocket::Close(), fReadBytesLeft, fReadMonitor, fReadPtr, TSocket::fRemoteProtocol, fSize, TSocket::fSocket, fSockets, fWriteBytesLeft, fWriteMonitor, fWritePtr, TSocket::GetDescriptor(), TROOT::GetListOfSockets(), gROOT, gROOTMutex, Init(), IsValid(), TSocket::IsValid(), kFALSE, kTRUE, R__LOCKGUARD2, TCollection::Remove(), TSocket::SetUrl(), and TSocket::TSocket().

TPSocket::TPSocket ( const char *  host,
Int_t  port,
Int_t  size,
TSocket sock 
)

Definition at line 171 of file TPSocket.cxx.

References TSeqCollection::Add(), TSocket::Authenticate(), TSocket::Close(), TSocket::fAddress, TSocket::fBytesRecv, TSocket::fBytesSent, TSocket::fCompress, TSocket::fLocalAddress, fReadBytesLeft, fReadMonitor, fReadPtr, TSocket::fRemoteProtocol, TSocket::fSecContext, TSocket::fService, TSocket::fServType, fSize, TSocket::fSocket, fSockets, TSocket::fTcpWindowSize, fWriteBytesLeft, fWriteMonitor, fWritePtr, TSocket::GetBytesRecv(), TSocket::GetBytesSent(), TSocket::GetCompressionLevel(), TSocket::GetDescriptor(), TSocket::GetInetAddress(), TROOT::GetListOfSockets(), TSocket::GetLocalInetAddress(), TSocket::GetRemoteProtocol(), TSocket::GetSecContext(), TSocket::GetService(), TSocket::GetServType(), TSocket::GetTcpWindowSize(), gROOT, gROOTMutex, Init(), IsValid(), TSocket::IsValid(), kFALSE, kTRUE, R__LOCKGUARD2, TCollection::Remove(), TSocket::SetUrl(), and TSocket::TSocket().

TPSocket::~TPSocket (  )  [virtual]

Definition at line 315 of file TPSocket.cxx.

References Close(), fReadBytesLeft, fReadMonitor, fReadPtr, fWriteBytesLeft, fWriteMonitor, and fWritePtr.

TPSocket::TPSocket ( TSocket pSockets[],
Int_t  size 
) [private]

TPSocket::TPSocket ( const TPSocket  )  [private]

TPSocket::TPSocket ( TInetAddress  address,
const char *  service,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

TPSocket::TPSocket ( TInetAddress  address,
Int_t  port,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

TPSocket::TPSocket ( const char *  host,
const char *  service,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

TPSocket::TPSocket ( const char *  host,
Int_t  port,
Int_t  size,
Int_t  tcpwindowsize = -1 
)

TPSocket::TPSocket ( const char *  host,
Int_t  port,
Int_t  size,
TSocket sock 
)

virtual TPSocket::~TPSocket (  )  [virtual]


Member Function Documentation

void TPSocket::operator= ( const TPSocket  )  [private]

void TPSocket::Init ( Int_t  tcpwindowsize,
TSocket sock = 0 
) [private]

Definition at line 363 of file TPSocket.cxx.

References TServerSocket::Accept(), TMonitor::Add(), TSocket::Close(), TSystem::CloseConnection(), TMonitor::DeActivateAll(), fReadBytesLeft, fReadMonitor, fReadPtr, fSize, TSocket::fSocket, fSockets, fWriteBytesLeft, fWriteMonitor, fWritePtr, TROOT::GetListOfSockets(), TServerSocket::GetLocalPort(), gROOT, gROOTMutex, gSystem, i, TSocket::IsValid(), kFALSE, kNoBlock, kNoDelay, TMonitor::kRead, TMonitor::kWrite, R__LOCKGUARD2, TCollection::Remove(), TSocket::Send(), TSocket::SetOption(), and SetOption().

Referenced by TPSocket().

Option_t* TPSocket::GetOption (  )  const [inline, private, virtual]

Reimplemented from TSocket.

Definition at line 53 of file TPSocket.h.

References TObject::GetOption().

Referenced by GetOption().

void TPSocket::Close ( Option_t opt = ""  )  [virtual]

Reimplemented from TSocket.

Definition at line 330 of file TPSocket.cxx.

References TSocket::Close(), fSize, fSockets, TROOT::GetListOfSockets(), gROOT, gROOTMutex, i, IsValid(), R__LOCKGUARD2, and TCollection::Remove().

Referenced by RecvRaw(), SendRaw(), and ~TPSocket().

Int_t TPSocket::GetDescriptor (  )  const [virtual]

Reimplemented from TSocket.

Definition at line 468 of file TPSocket.cxx.

References fSize, fSockets, and TSocket::GetDescriptor().

TInetAddress TPSocket::GetLocalInetAddress (  )  [virtual]

Reimplemented from TSocket.

Definition at line 451 of file TPSocket.cxx.

References TSocket::fLocalAddress, fSize, fSockets, TSocket::GetDescriptor(), TSocket::GetLocalInetAddress(), TInetAddress::GetPort(), TSystem::GetSockName(), gSystem, and IsValid().

Int_t TPSocket::Send ( const TMessage mess  )  [virtual]

Reimplemented from TSocket.

Definition at line 480 of file TPSocket.cxx.

References buf, TObject::Error(), TSocket::fCompress, fSize, fSockets, TMessage::GetCompressionLevel(), TBuffer::IsReading(), IsValid(), kDefault, kMESS_ACK, RecvRaw(), TSocket::Send(), TSocket::SendProcessIDs(), SendRaw(), TSocket::SendStreamerInfos(), and TMessage::SetLength().

Referenced by pclient().

Int_t TPSocket::Send ( Int_t  kind  )  [inline, virtual]

Reimplemented from TSocket.

Definition at line 71 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::Send ( Int_t  status,
Int_t  kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 72 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::Send ( const char *  mess,
Int_t  kind = kMESS_STRING 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 73 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::SendRaw ( const void *  buffer,
Int_t  length,
ESendRecvOptions  opt 
) [virtual]

Reimplemented from TSocket.

Definition at line 545 of file TPSocket.cxx.

References TMonitor::Activate(), Close(), TMonitor::DeActivateAll(), fSize, fSockets, fWriteBytesLeft, fWriteMonitor, fWritePtr, i, kDefault, kDontBlock, kNoBlock, len, s, TMonitor::Select(), TSocket::SendRaw(), and TSocket::SetOption().

Referenced by pclient(), Recv(), and Send().

Int_t TPSocket::Recv ( TMessage *&  mess  )  [virtual]

Reimplemented from TSocket.

Definition at line 622 of file TPSocket.cxx.

References buf, fSize, IsValid(), kDefault, kMESS_ACK, len, n, net2host(), ok, TSocket::Recv(), TSocket::RecvProcessIDs(), RecvRaw(), TSocket::RecvStreamerInfos(), SendRaw(), TMessage::SetWhat(), and TMessage::What().

Referenced by pserv().

Int_t TPSocket::Recv ( Int_t status,
Int_t kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 76 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::Recv ( char *  mess,
Int_t  max 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 77 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::Recv ( char *  mess,
Int_t  max,
Int_t kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 78 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::RecvRaw ( void *  buffer,
Int_t  length,
ESendRecvOptions  opt 
) [virtual]

Reimplemented from TSocket.

Definition at line 677 of file TPSocket.cxx.

References TMonitor::Activate(), Close(), TMonitor::DeActivateAll(), fReadBytesLeft, fReadMonitor, fReadPtr, fSize, fSockets, i, kDefault, kDontBlock, kNoBlock, TSocket::RecvRaw(), s, TMonitor::Select(), and TSocket::SetOption().

Referenced by pserv(), Recv(), and Send().

Bool_t TPSocket::IsValid (  )  const [inline, virtual]

Reimplemented from TSocket.

Definition at line 81 of file TPSocket.h.

References fSockets, kFALSE, and kTRUE.

Referenced by Close(), GetLocalInetAddress(), Recv(), Send(), and TPSocket().

Int_t TPSocket::GetErrorCode (  )  const

Reimplemented from TSocket.

Definition at line 779 of file TPSocket.cxx.

References fSize, fSockets, and TSocket::GetErrorCode().

Int_t TPSocket::SetOption ( ESockOptions  opt,
Int_t  val 
) [virtual]

Reimplemented from TSocket.

Definition at line 751 of file TPSocket.cxx.

References fSize, fSockets, i, and TSocket::SetOption().

Referenced by Init(), and TPSocket().

Int_t TPSocket::GetOption ( ESockOptions  opt,
Int_t val 
) [virtual]

Reimplemented from TSocket.

Definition at line 765 of file TPSocket.cxx.

References fSize, fSockets, TSocket::GetOption(), GetOption(), and i.

Int_t TPSocket::GetSize (  )  const [inline]

Definition at line 85 of file TPSocket.h.

References fSize.

Referenced by pserv().

void TPSocket::operator= ( const TPSocket  )  [private]

void TPSocket::Init ( Int_t  tcpwindowsize,
TSocket sock = 0 
) [private]

Option_t* TPSocket::GetOption (  )  const [inline, private, virtual]

Reimplemented from TSocket.

Definition at line 53 of file TPSocket.h.

References TObject::GetOption().

void TPSocket::Close ( Option_t opt = ""  )  [virtual]

Reimplemented from TSocket.

Int_t TPSocket::GetDescriptor (  )  const [virtual]

Reimplemented from TSocket.

TInetAddress TPSocket::GetLocalInetAddress (  )  [virtual]

Reimplemented from TSocket.

Int_t TPSocket::Send ( const TMessage mess  )  [virtual]

Reimplemented from TSocket.

Int_t TPSocket::Send ( Int_t  kind  )  [inline, virtual]

Reimplemented from TSocket.

Definition at line 71 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::Send ( Int_t  status,
Int_t  kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 72 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::Send ( const char *  mess,
Int_t  kind = kMESS_STRING 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 73 of file TPSocket.h.

References TSocket::Send().

Int_t TPSocket::SendRaw ( const void *  buffer,
Int_t  length,
ESendRecvOptions  opt 
) [virtual]

Reimplemented from TSocket.

Int_t TPSocket::Recv ( TMessage *&  mess  )  [virtual]

Reimplemented from TSocket.

Int_t TPSocket::Recv ( Int_t status,
Int_t kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 76 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::Recv ( char *  mess,
Int_t  max 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 77 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::Recv ( char *  mess,
Int_t  max,
Int_t kind 
) [inline, virtual]

Reimplemented from TSocket.

Definition at line 78 of file TPSocket.h.

References TSocket::Recv().

Int_t TPSocket::RecvRaw ( void *  buffer,
Int_t  length,
ESendRecvOptions  opt 
) [virtual]

Reimplemented from TSocket.

Bool_t TPSocket::IsValid (  )  const [inline, virtual]

Reimplemented from TSocket.

Definition at line 81 of file TPSocket.h.

References fSockets, kFALSE, and kTRUE.

Int_t TPSocket::GetErrorCode (  )  const

Reimplemented from TSocket.

Int_t TPSocket::SetOption ( ESockOptions  opt,
Int_t  val 
) [virtual]

Reimplemented from TSocket.

Int_t TPSocket::GetOption ( ESockOptions  opt,
Int_t val 
) [virtual]

Reimplemented from TSocket.

Int_t TPSocket::GetSize (  )  const [inline]

Definition at line 85 of file TPSocket.h.

References fSize.


Friends And Related Function Documentation

TPServerSocket [friend]

Definition at line 37 of file TPSocket.h.


Member Data Documentation

TSocket** TPSocket::fSockets [private]

Definition at line 40 of file TPSocket.h.

Referenced by Close(), GetDescriptor(), GetErrorCode(), GetLocalInetAddress(), GetOption(), Init(), IsValid(), RecvRaw(), Send(), SendRaw(), SetOption(), and TPSocket().

TMonitor* TPSocket::fWriteMonitor [private]

Definition at line 41 of file TPSocket.h.

Referenced by Init(), SendRaw(), TPSocket(), and ~TPSocket().

TMonitor* TPSocket::fReadMonitor [private]

Definition at line 42 of file TPSocket.h.

Referenced by Init(), RecvRaw(), TPSocket(), and ~TPSocket().

Int_t TPSocket::fSize [private]

Definition at line 43 of file TPSocket.h.

Referenced by Close(), GetDescriptor(), GetErrorCode(), GetLocalInetAddress(), GetOption(), GetSize(), Init(), Recv(), RecvRaw(), Send(), SendRaw(), SetOption(), and TPSocket().

Int_t* TPSocket::fWriteBytesLeft [private]

Definition at line 44 of file TPSocket.h.

Referenced by Init(), SendRaw(), TPSocket(), and ~TPSocket().

Int_t* TPSocket::fReadBytesLeft [private]

Definition at line 45 of file TPSocket.h.

Referenced by Init(), RecvRaw(), TPSocket(), and ~TPSocket().

char** TPSocket::fWritePtr [private]

Definition at line 46 of file TPSocket.h.

Referenced by Init(), SendRaw(), TPSocket(), and ~TPSocket().

char** TPSocket::fReadPtr [private]

Definition at line 47 of file TPSocket.h.

Referenced by Init(), RecvRaw(), TPSocket(), and ~TPSocket().

TSocket** TPSocket::fSockets [private]

Definition at line 40 of file TPSocket.h.

TMonitor* TPSocket::fWriteMonitor [private]

Definition at line 41 of file TPSocket.h.

TMonitor* TPSocket::fReadMonitor [private]

Definition at line 42 of file TPSocket.h.

Int_t* TPSocket::fWriteBytesLeft [private]

Definition at line 44 of file TPSocket.h.

Int_t* TPSocket::fReadBytesLeft [private]

Definition at line 45 of file TPSocket.h.

char** TPSocket::fWritePtr [private]

Definition at line 46 of file TPSocket.h.

char** TPSocket::fReadPtr [private]

Definition at line 47 of file TPSocket.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:45:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1