// @(#)root/proofx:$Id: TXUnixSocket.h 24719 2008-07-09 07:07:25Z ganis $
// Author: G. Ganis Oct 2005

/*************************************************************************
 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TXUnixSocket
#define ROOT_TXUnixSocket

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TXUnixSocket                                                         //
//                                                                      //
// Implementation of TXSocket using PF_UNIX sockets.                    //
// Used for the internal connection between coordinator and proofserv.  //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TXSocket
#include "TXSocket.h"
#endif
#include <list>

class TXHandler;

class TXUnixSocket  : public TXSocket {

friend class TXProofServ;

private:
   std::list<Int_t>  fClientIDs;

public:
   TXUnixSocket(const char *u,
                Int_t psid = -1, Char_t ver = -1, TXHandler *handler = 0);
   virtual ~TXUnixSocket() { fSessionID = -1; }

   Int_t GetClientID() const { return (fClientIDs.size() > 0) ? fClientIDs.front() : -1; }
   Int_t GetClientIDSize() const { return fClientIDs.size(); }

   void  RemoveClientID() { if (fClientIDs.size() > 1) fClientIDs.pop_front(); }
   void  SetClientID(Int_t cid) { fClientIDs.push_front(cid); }

   // Try reconnection after error
   Int_t Reconnect();

   ClassDef(TXUnixSocket, 0) //Connection class for Xrd PROOF using UNIX sockets
};

#endif

Last change: Wed Jul 9 12:31:39 2008
Last generated: 2008-07-09 12:31

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.