Logo ROOT  
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
29
30friend class TXSocket;
31friend class TXUnixSocket;
32
33private:
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
42public:
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(* XrdProofConnSender_t)(const char *, int, void *)
Definition: XrdProofConn.h:46
High level handler of connections to XProofD.
Definition: TXSocket.h:59
Implementation of TXSocket using PF_UNIX sockets.
Definition: TXUnixSocket.h:29
friend class XrdProofPhyConn
Definition: XrdProofConn.h:52
XrdClientMessage * ReadMsg()
Pickup message from the queue.
bool Init(const char *url, int fd=-1)
Initialization.
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.
void Close(const char *opt="")
Close the connection.
void SetAsync(XrdClientAbsUnsolMsgHandler *uh, XrdProofConnSender_t=0, void *=0)
Set handler of unsolicited responses.
int WriteRaw(const void *buf, int len, XrdClientPhyConnection *=0)
Low level write call.
bool GetAccessToSrv(XrdClientPhyConnection *=0)
Gets access to the connected server.
virtual ~XrdProofPhyConn()