Logo ROOT   6.12/07
Reference Guide
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);
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);
53  int WriteRaw(const void *buf, int len, XrdClientPhyConnection * = 0);
54 };
55 
56 #endif
int WriteRaw(const void *buf, int len, XrdClientPhyConnection *=0)
Low level write call.
void Close(const char *opt="")
Close the connection.
void SetAsync(XrdClientAbsUnsolMsgHandler *uh, XrdProofConnSender_t=0, void *=0)
Set handler of unsolicited responses.
Implementation of TXSocket using PF_UNIX sockets.
Definition: TXUnixSocket.h:29
bool Init(const char *url, int fd=-1)
Initialization.
bool GetAccessToSrv(XrdClientPhyConnection *=0)
Gets access to the connected server.
int(* XrdProofConnSender_t)(const char *, int, void *)
Definition: XrdProofConn.h:46
virtual ~XrdProofPhyConn()
High level handler of connections to XProofD.
Definition: TXSocket.h:59
XrdClientMessage * ReadMsg()
Pickup message from the queue.
void Connect(int fd=-1)
Run the connection attempts: the result is stored in fConnected.
int TryConnect(int fd=-1)
Connect to remote server.
int ReadRaw(void *buf, int len, XrdClientPhyConnection *=0)
Low level write call.
XrdProofPhyConn(const char *url, int psid=-1, char ver=-1, XrdClientAbsUnsolMsgHandler *uh=0, bool tcp=0, int fd=-1)
Constructor.