TXUnixSocket.h

Go to the documentation of this file.
00001 // @(#)root/proofx:$Id: TXUnixSocket.h 24719 2008-07-09 07:07:25Z ganis $
00002 // Author: G. Ganis Oct 2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TXUnixSocket
00013 #define ROOT_TXUnixSocket
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TXUnixSocket                                                         //
00018 //                                                                      //
00019 // Implementation of TXSocket using PF_UNIX sockets.                    //
00020 // Used for the internal connection between coordinator and proofserv.  //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TXSocket
00025 #include "TXSocket.h"
00026 #endif
00027 #include <list>
00028 
00029 class TXHandler;
00030 
00031 class TXUnixSocket  : public TXSocket {
00032 
00033 friend class TXProofServ;
00034 
00035 private:
00036    std::list<Int_t>  fClientIDs;
00037 
00038 public:
00039    TXUnixSocket(const char *u,
00040                 Int_t psid = -1, Char_t ver = -1, TXHandler *handler = 0);
00041    virtual ~TXUnixSocket() { fSessionID = -1; }
00042 
00043    Int_t GetClientID() const { return (fClientIDs.size() > 0) ? fClientIDs.front() : -1; }
00044    Int_t GetClientIDSize() const { return fClientIDs.size(); }
00045 
00046    void  RemoveClientID() { if (fClientIDs.size() > 1) fClientIDs.pop_front(); }
00047    void  SetClientID(Int_t cid) { fClientIDs.push_front(cid); }
00048 
00049    // Try reconnection after error
00050    Int_t Reconnect();
00051 
00052    ClassDef(TXUnixSocket, 0) //Connection class for Xrd PROOF using UNIX sockets
00053 };
00054 
00055 #endif

Generated on Tue Jul 5 14:52:27 2011 for ROOT_528-00b_version by  doxygen 1.5.1