12 #ifndef ROOT_TUDPSocket 13 #define ROOT_TUDPSocket 33 #ifndef ROOT_TInetAddress 36 #ifndef ROOT_MessageTypes 39 #ifndef ROOT_TVirtualAuth 42 #ifndef ROOT_TSecContext 45 #ifndef ROOT_TTimeStamp 48 #ifndef ROOT_TVirtualMutex 88 TUDPSocket() : fAddress(), fBytesRecv(0), fBytesSent(0), fCompress(0),
89 fLocalAddress(), fRemoteProtocol(), fSecContext(0), fService(),
90 fServType(
kSOCKD), fSocket(-1), fUrl(),
91 fBitsInfo(), fUUIDs(0), fLastUsageMtx(0), fLastUsage() { }
106 TUDPSocket(
const char *host,
const char *service);
160 void SetUrl(
const char *url) { fUrl = url; }
void SetCompressionSettings(Int_t settings=1)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level...
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
virtual void Close(Option_t *opt="")
Close the socket.
const char * GetService() const
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
void SendProcessIDs(const TMessage &mess)
Check if TProcessIDs must be sent.
This class represents an Internet Protocol (IP) address.
This class implements a mutex interface.
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
Int_t GetCompressionLevel() const
void SetDescriptor(Int_t desc)
Int_t GetServType() const
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
void SetCompressionLevel(Int_t level=1)
See comments for function SetCompressionSettings.
static ULong64_t fgBytesRecv
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
void Set()
Set Date/Time to current time as reported by the system.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
void SetServType(Int_t st)
void SetUrl(const char *url)
Option_t * GetOption() const
void SetRemoteProtocol(Int_t rproto)
Int_t GetErrorCode() const
Returns error code.
UInt_t GetBytesRecv() const
Int_t GetCompressionAlgorithm() const
static ULong64_t fgBytesSent
void SetSecContext(TSecContext *ctx)
virtual Int_t GetLocalPort()
Return the local port # to which the socket is bound.
TTimeStamp GetLastUsage()
TSecContext * fSecContext
void SetService(const char *service)
#define R__LOCKGUARD2(mutex)
TUDPSocket & operator=(const TUDPSocket &)
static ULong64_t GetSocketBytesRecv()
Get total number of bytes received via all sockets.
void SetCompressionAlgorithm(Int_t algorithm=0)
See comments for function SetCompressionSettings.
Int_t GetRemoteProtocol() const
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
TInetAddress fLocalAddress
virtual Int_t Select(Int_t interest=kRead, Long_t timeout=-1)
Waits for this socket to change status.
unsigned long long ULong64_t
The TTimeStamp encapsulates seconds and ns since EPOCH.
virtual Bool_t IsValid() const
virtual Option_t * GetOption() const
TInetAddress GetInetAddress() const
Mother of all ROOT objects.
static void NetError(const char *where, Int_t error)
Print error string depending on error code.
Int_t GetCompressionSettings() const
TSecContext * GetSecContext() const
virtual Int_t Reconnect()
UInt_t GetBytesSent() const
TVirtualMutex * fLastUsageMtx
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
const char * GetUrl() const
static ULong64_t GetSocketBytesSent()
Get total number of bytes sent via all sockets.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual Int_t GetDescriptor() const