Logo ROOT   6.14/05
Reference Guide
TXSocketHandler.h
Go to the documentation of this file.
1 // @(#)root/proofx:$Id$
2 // Author: G. Ganis Oct 2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TXSocketHandler
13 #define ROOT_TXSocketHandler
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TXSocketHandler //
18 // //
19 // Input handler for xproofd sockets. These sockets cannot be directly //
20 // monitored on their descriptor, because the reading activity goes via //
21 // the reader thread. This class allows to handle this problem. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include "TSysEvtHandler.h"
26 #include "TXSocket.h"
27 
28 class TXSocketHandler : public TFileHandler {
29 
30 // friend class TXSocket;
31 
32  TFileHandler *fHandler; // Handler associated to the input socket
33  TSocket *fInputSock; // Input socket from client or master
34 
36  { fHandler = h; fInputSock = s; }
37 
38  static TXSocketHandler *fgSocketHandler; // Input socket handler
39 
41  TFileHandler(TXSocket::fgPipe.GetRead(), 1)
42  { fHandler = h; fInputSock = s; }
43 public:
44  virtual ~TXSocketHandler() { }
45 
46  Bool_t Notify();
47  Bool_t ReadNotify() { return Notify(); }
48 
50 
51  ClassDef(TXSocketHandler, 0) //Input handler class for xproofd sockets
52 };
53 
54 #endif
Bool_t ReadNotify()
Notify when something can be read from the descriptor associated with this handler.
static TXSocketHandler * GetSocketHandler(TFileHandler *h=0, TSocket *s=0)
Get an instance of the input socket handler with 'h' as handler, connected to socket 's'...
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:320
void SetHandler(TFileHandler *h, TSocket *s)
TFileHandler * fHandler
Bool_t Notify()
Set readiness on the monitor.
static TXSocketHandler * fgSocketHandler
Input handler for XProofD sockets.
High level handler of connections to XProofD.
Definition: TXSocket.h:59
#define h(i)
Definition: RSha256.hxx:106
virtual ~TXSocketHandler()
static constexpr double s
TSocket * fInputSock
TXSocketHandler(TFileHandler *h, TSocket *s)