Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
XrdProofPhyConn.h
Go to the documentation of this file.
1 // @(#)root/proofd:$Id$
2 // Author: G. Ganis June 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_XrdProofPhyConn
13 #define ROOT_XrdProofPhyConn
14 
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // XrdProofPhyConn //
19 // //
20 // Authors: G. Ganis, CERN, 2005 //
21 // //
22 // XrdProofConn implementation using a simple phycical connection //
23 // (Unix or Tcp) //
24 //////////////////////////////////////////////////////////////////////////
25 
26 #include "XrdProofConn.h"
27 
28 class XrdProofPhyConn : public XrdProofConn {
29 
30 friend class TXSocket;
31 friend class TXUnixSocket;
32 
33 private:
34 
35  bool fTcp; // TRUE for TCP sockets
36 
37  void Connect(int fd = -1);
38  int TryConnect(int fd = -1);
39  bool GetAccessToSrv(XrdClientPhyConnection * = 0);
40  bool Init(const char *url, int fd = -1);
41 
42 public:
43  XrdProofPhyConn(const char *url, int psid = -1, char ver = -1,
44  XrdClientAbsUnsolMsgHandler *uh = 0, bool tcp = 0, int fd = -1);
45  virtual ~XrdProofPhyConn() { Close(); }
46 
47  void Close(const char *opt = "");
48 
49  // Send, Recv interfaces
50  int ReadRaw(void *buf, int len, XrdClientPhyConnection * = 0);
51  XrdClientMessage *ReadMsg();
52  void SetAsync(XrdClientAbsUnsolMsgHandler *uh, XrdProofConnSender_t = 0, void * = 0);
53  int WriteRaw(const void *buf, int len, XrdClientPhyConnection * = 0);
54 };
55 
56 #endif