#include <TGo4Socket.h>
Public Member Functions | |
TGo4Socket (Bool_t IsClient) | |
virtual | ~TGo4Socket () |
virtual Int_t | Open (const char *host, Int_t port, Bool_t keepservsock=kFALSE) |
virtual Int_t | Close (Option_t *opt="") |
virtual Int_t | Send (TObject *obj) |
virtual Int_t | Send (const char *name) |
virtual TObject * | Recv (const char *name=0) |
virtual char * | RecvRaw (const char *name=0) |
Bool_t | IsOpen () const |
Bool_t | IsClientMode () const |
Int_t | GetPort () const |
Int_t | SendBuffer (TBuffer *buf) |
Send raw buffer of external TBuffer object. | |
Int_t | ReceiveBuffer () |
Receive raw buffer and fill the internal TBuffer of this socket instance with it. | |
const TBuffer * | GetBuffer () const |
Access the internal receiving buffer of this socket. | |
Static Public Attributes | |
static const Int_t | fguOPENWAIT = 200 |
Time to sleep between client open retries. | |
static const Int_t | fgiOPENCYCLES = 6 |
Number of retries for client open. | |
static const Int_t | fgiBUFLENGTH = 256 |
Raw transport buffer size. | |
static const Int_t | fgiBUFINITSIZE = 65536 |
Initial size for object receive buffer (TBuffer). | |
static const Int_t | fgiBUFEXTRASPACE = 8 |
ROOT internal constant: extra space for reallocating object receive buffer (TBuffer). | |
static const char * | fgcGOON = "-I- go on" |
First connection string, we are told to go on. | |
static const Int_t | fgiISOWNER = BIT(14) |
We emulate the protected owner flag of the TBuffer class, needed for reallocation! | |
Protected Member Functions | |
TGo4Socket () | |
void | ReallocBuffer (TBuffer *buffer, Int_t oldsize, Int_t newsize) |
Reallocate the fixed input buffer if necessary. | |
Private Attributes | |
Bool_t | fbClientMode |
True if instance runs in as client. | |
Bool_t | fbOpen |
True if connection is open. | |
TGo4SocketSignalHandler * | fxSignalHandler |
1 | |
TSocket * | fxSocket |
root TSocket class doing the work | |
TServerSocket * | fxServerSocket |
Server Socket (server mode only). | |
Int_t | fiPort |
Connected port number (of server socket which opened with portnumberscan). | |
char * | fxLocalBuffer |
TBuffer * | fxBuffer |
1 |
Definition at line 24 of file TGo4Socket.h.
TGo4Socket::TGo4Socket | ( | Bool_t | IsClient | ) |
Definition at line 49 of file TGo4Socket.cxx.
TGo4Socket::~TGo4Socket | ( | ) | [virtual] |
Definition at line 68 of file TGo4Socket.cxx.
TGo4Socket::TGo4Socket | ( | ) | [protected] |
Int_t TGo4Socket::Open | ( | const char * | host, | |
Int_t | port, | |||
Bool_t | keepservsock = kFALSE | |||
) | [virtual] |
Definition at line 86 of file TGo4Socket.cxx.
Int_t TGo4Socket::Close | ( | Option_t * | opt = "" |
) | [virtual] |
Definition at line 211 of file TGo4Socket.cxx.
Int_t TGo4Socket::Send | ( | TObject * | obj | ) | [virtual] |
Definition at line 367 of file TGo4Socket.cxx.
Int_t TGo4Socket::Send | ( | const char * | name | ) | [virtual] |
Definition at line 403 of file TGo4Socket.cxx.
TObject * TGo4Socket::Recv | ( | const char * | name = 0 |
) | [virtual] |
Definition at line 471 of file TGo4Socket.cxx.
char * TGo4Socket::RecvRaw | ( | const char * | name = 0 |
) | [virtual] |
Definition at line 433 of file TGo4Socket.cxx.
Bool_t TGo4Socket::IsOpen | ( | ) | const [inline] |
Definition at line 37 of file TGo4Socket.h.
Bool_t TGo4Socket::IsClientMode | ( | ) | const [inline] |
Definition at line 39 of file TGo4Socket.h.
Int_t TGo4Socket::GetPort | ( | ) | const [inline] |
Definition at line 41 of file TGo4Socket.h.
Int_t TGo4Socket::SendBuffer | ( | TBuffer * | buf | ) |
Send raw buffer of external TBuffer object.
Method will prepare raw buffer as a TMessage, i.e. the receiving side should be able to receive it by root TSocket message protocol.
Definition at line 228 of file TGo4Socket.cxx.
Int_t TGo4Socket::ReceiveBuffer | ( | ) |
Receive raw buffer and fill the internal TBuffer of this socket instance with it.
Definition at line 293 of file TGo4Socket.cxx.
const TBuffer* TGo4Socket::GetBuffer | ( | ) | const [inline] |
void TGo4Socket::ReallocBuffer | ( | TBuffer * | buffer, | |
Int_t | oldsize, | |||
Int_t | newsize | |||
) | [protected] |
const Int_t TGo4Socket::fguOPENWAIT = 200 [static] |
const Int_t TGo4Socket::fgiOPENCYCLES = 6 [static] |
const Int_t TGo4Socket::fgiBUFLENGTH = 256 [static] |
const Int_t TGo4Socket::fgiBUFINITSIZE = 65536 [static] |
const Int_t TGo4Socket::fgiBUFEXTRASPACE = 8 [static] |
ROOT internal constant: extra space for reallocating object receive buffer (TBuffer).
Definition at line 74 of file TGo4Socket.h.
const char * TGo4Socket::fgcGOON = "-I- go on" [static] |
const Int_t TGo4Socket::fgiISOWNER = BIT(14) [static] |
We emulate the protected owner flag of the TBuffer class, needed for reallocation!
Definition at line 80 of file TGo4Socket.h.
Bool_t TGo4Socket::fbClientMode [private] |
Bool_t TGo4Socket::fbOpen [private] |
TSocket* TGo4Socket::fxSocket [private] |
TServerSocket* TGo4Socket::fxServerSocket [private] |
Int_t TGo4Socket::fiPort [private] |
Connected port number (of server socket which opened with portnumberscan).
Definition at line 107 of file TGo4Socket.h.
char* TGo4Socket::fxLocalBuffer [private] |
Definition at line 109 of file TGo4Socket.h.
TBuffer* TGo4Socket::fxBuffer [private] |