Logo ROOT   6.18/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
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; }
43public:
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
#define h(i)
Definition: RSha256.hxx:106
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:326
Input handler for XProofD sockets.
static TXSocketHandler * fgSocketHandler
TSocket * fInputSock
TXSocketHandler(TFileHandler *h, TSocket *s)
void SetHandler(TFileHandler *h, TSocket *s)
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_t ReadNotify()
Notify when something can be read from the descriptor associated with this handler.
virtual ~TXSocketHandler()
Bool_t Notify()
Set readiness on the monitor.
TFileHandler * fHandler
High level handler of connections to XProofD.
Definition: TXSocket.h:59
static constexpr double s