v2.10-0 (21000JUN2005)

Go4Socket
Class TGo4Socket


class TGo4Socket


Field Summary
 private Bool_tfbClientMode
          True if instance runs in as client
 private Bool_tfbOpen
          True if connection is open
 const static const Text_t[]fgcGOON
          First connection string, we are told to go on...
 const static const Int_tfgiBUFEXTRASPACE
          ROOT internal constant: extra space for reallocating object receive buffer (TBuffer)
 const static const Int_tfgiBUFINITSIZE
          Initial size for object receive buffer (TBuffer)
 const static const Int_tfgiBUFLENGTH
          Raw transport buffer size
 const static const Int_tfgiISOWNER
          We emulate the protected owner flag of the TBuffer class, needed for reallocation!
 const static const Int_tfgiOPENCYCLES
          Number of retries for client open
 const static const Int_tfguOPENWAIT
          Time to sleep between client open retries
 private Int_tfiPort
          Connected port number (of server socket which opened with portnumberscan)
 private TBuffer*fxBuffer
           
 private Text_t*fxLocalBuffer
           
 private TServerSocket*fxServerSocket
          Server Socket (server mode only)
 private TGo4SocketSignalHandler*fxSignalHandler
           
 private TSocket*fxSocket
          root TSocket class doing the work

Constructor Summary
 TGo4Socket(Bool_t IsClient)
           
 protected TGo4Socket()
           

Destructor Summary
 virtual synchronized ~TGo4Socket()
           

Method Summary
 virtual Int_tClose()
           
 const const TBuffer*GetBuffer()
          Access the internal receiving buffer of this socket.
 const Int_tGetPort()
           
 const Bool_tIsClientMode()
           
 const Bool_tIsOpen()
           
 virtual Int_tOpen(const char * host, Int_t port, Bool_t keepservsock)
           
 protected voidReallocBuffer(TBuffer* buffer, Int_t oldsize, Int_t newsize)
          Reallocate the fixed input buffer if necessary
 Int_tReceiveBuffer()
          Receive raw buffer and fill the internal TBuffer of this socket instance
with it.
 virtual TObject*Recv(const char * name)
           
 virtual Text_t*RecvRaw(const char * name)
           
 virtual Int_tSend(TObject* obj)
           
 virtual Int_tSend(const char * name)
           
 Int_tSendBuffer(TBuffer* buf)
          Send raw buffer of external TBuffer object.

Field Detail

fbClientMode

private Bool_t fbClientMode
True if instance runs in as client

fbOpen

private Bool_t fbOpen
True if connection is open

fgcGOON

public const static const Text_t[] fgcGOON
First connection string, we are told to go on...

fgiBUFEXTRASPACE

public const static const Int_t fgiBUFEXTRASPACE
ROOT internal constant: extra space for reallocating object receive buffer (TBuffer)

fgiBUFINITSIZE

public const static const Int_t fgiBUFINITSIZE
Initial size for object receive buffer (TBuffer)

fgiBUFLENGTH

public const static const Int_t fgiBUFLENGTH
Raw transport buffer size

fgiISOWNER

public const static const Int_t fgiISOWNER
We emulate the protected owner flag of the TBuffer class, needed for reallocation!

fgiOPENCYCLES

public const static const Int_t fgiOPENCYCLES
Number of retries for client open

fguOPENWAIT

public const static const Int_t fguOPENWAIT
Time to sleep between client open retries

fiPort

private Int_t fiPort
Connected port number (of server socket which opened with portnumberscan)

fxBuffer

private TBuffer* fxBuffer
supplierCardinality 1
link aggregation

fxLocalBuffer

private Text_t* fxLocalBuffer

fxServerSocket

private TServerSocket* fxServerSocket
Server Socket (server mode only)

fxSignalHandler

private TGo4SocketSignalHandler* fxSignalHandler
supplierCardinality 1
link aggregation

fxSocket

private TSocket* fxSocket
root TSocket class doing the work
Constructor Detail

TGo4Socket

public TGo4Socket(Bool_t IsClient)

TGo4Socket

protected TGo4Socket()
Method Detail

~TGo4Socket

public virtual synchronized ~TGo4Socket()
Method Detail

Close

public virtual Int_t Close()

GetBuffer

public const const TBuffer* GetBuffer()
Access the internal receiving buffer of this socket.

GetPort

public const Int_t GetPort()

IsClientMode

public const Bool_t IsClientMode()

IsOpen

public const Bool_t IsOpen()

Open

public virtual Int_t Open(const char * host, Int_t port, Bool_t keepservsock)

ReallocBuffer

protected void ReallocBuffer(TBuffer* buffer, Int_t oldsize, Int_t newsize)
Reallocate the fixed input buffer if necessary

ReceiveBuffer

public Int_t ReceiveBuffer()
Receive raw buffer and fill the internal TBuffer of this socket instance
with it.

Recv

public virtual TObject* Recv(const char * name)

RecvRaw

public virtual Text_t* RecvRaw(const char * name)

Send

public virtual Int_t Send(TObject* obj)

Send

public virtual Int_t Send(const char * name)

SendBuffer

public Int_t 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.

Association Links

to Class TGo4SocketSignalHandler

Supplier Cardinality 1
Type aggregation

to Class TServerSocket

Server Socket (server mode only)

to Class TBuffer

Supplier Cardinality 1
Type aggregation

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005