00001 #ifndef __OLB_PROTOCOL_H__ 00002 #define __OLB_PROTOCOL_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d O l b P r o t o c o l . h h */ 00006 /* */ 00007 /* (c) 2006 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00009 /* DE-AC03-76-SFO0515 with the Department of Energy */ 00010 /******************************************************************************/ 00011 00012 // $Id: XrdOlbProtocol.hh,v 1.2 2007/07/26 15:18:24 ganis Exp $ 00013 00014 #include "Xrd/XrdProtocol.hh" 00015 #include "XrdSys/XrdSysPthread.hh" 00016 00017 class XrdOlbProtocol : public XrdProtocol 00018 { 00019 public: 00020 00021 static XrdOlbProtocol *Alloc(); 00022 00023 void DoIt() {} // Protocol never rescheduled 00024 00025 XrdProtocol *Match(XrdLink *lp); // Upon accept 00026 00027 int Process(XrdLink *lp); // Initial entry 00028 00029 void Recycle(XrdLink *lp, int consec, const char *reason); 00030 00031 static void setNet(XrdInet *net, int rwt) 00032 {myNet = net; readWait = rwt;} 00033 00034 int Stats(char *buff, int blen, int do_sync=0) {return 0;} 00035 00036 XrdOlbProtocol() : XrdProtocol("olb protocol handler") 00037 {ProtLink = 0;} 00038 ~XrdOlbProtocol() {} 00039 00040 private: 00041 static XrdInet *myNet; 00042 static int readWait; 00043 static XrdSysMutex ProtMutex; 00044 static XrdOlbProtocol *ProtStack; 00045 XrdOlbProtocol *ProtLink; 00046 }; 00047 #endif
1.7.1