Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TXUnixSocket.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_TXUnixSocket
13#define ROOT_TXUnixSocket
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TXUnixSocket //
18// //
19// Implementation of TXSocket using PF_UNIX sockets. //
20// Used for the internal connection between coordinator and proofserv. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TXSocket.h"
25#include <list>
26
27class TXHandler;
28
29class TXUnixSocket : public TXSocket {
30
31friend class TXProofServ;
32
33private:
34 std::list<Int_t> fClientIDs;
35
36public:
37 TXUnixSocket(const char *u, Int_t psid = -1, Char_t ver = -1,
38 TXHandler *handler = 0, int fd = -1);
39 virtual ~TXUnixSocket() { fSessionID = -1; }
40
41 Int_t GetClientID() const { return (fClientIDs.size() > 0) ? fClientIDs.front() : -1; }
42 Int_t GetClientIDSize() const { return fClientIDs.size(); }
43
44 void RemoveClientID() { if (fClientIDs.size() > 1) fClientIDs.pop_front(); }
45 void SetClientID(Int_t cid) { fClientIDs.push_front(cid); }
46
47 // Try reconnection after error
49
50 ClassDef(TXUnixSocket, 0) //Connection class for Xrd PROOF using UNIX sockets
51};
52
53#endif
int Int_t
Definition RtypesCore.h:45
char Char_t
Definition RtypesCore.h:37
#define ClassDef(name, id)
Definition Rtypes.h:325
Handler of asynchronous events for XProofD sockets.
Definition TXHandler.h:28
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
Definition TXProofServ.h:30
High level handler of connections to XProofD.
Definition TXSocket.h:59
friend class TXUnixSocket
Definition TXSocket.h:66
Short_t fSessionID
Definition TXSocket.h:71
Implementation of TXSocket using PF_UNIX sockets.
Int_t Reconnect()
Try reconnection after failure.
Int_t GetClientID() const
void RemoveClientID()
void SetClientID(Int_t cid)
virtual ~TXUnixSocket()
Int_t GetClientIDSize() const
std::list< Int_t > fClientIDs