Logo ROOT   6.14/05
Reference Guide
TKSocket.h
Go to the documentation of this file.
1 // @(#)root/krb5auth:$Id$
2 // Author: Maarten Ballintijn 27/10/2003
3 
4 #ifndef ROOT_TKSocket
5 #define ROOT_TKSocket
6 
7 #if !defined(__CINT__)
8 
9 #include "Krb5Auth.h"
10 
11 #else
12 
13 typedef void* krb5_principal;
14 typedef void* krb5_auth_context;
15 typedef void* krb5_context;
16 typedef void* krb5_ccache;
17 typedef void* krb5_principal;
18 
19 #endif
20 
21 #include "TObject.h"
22 
23 
24 class TSocket;
25 
26 
27 class TKSocket : public TObject {
28 
29 private:
30  TSocket *fSocket; //underlying socket
31  krb5_principal fServer; //server principal
32  krb5_auth_context fAuthContext; //per connection kerberos authentication context
33 
34  static krb5_context fgContext; //shared kerberos context
35  static krb5_ccache fgCCDef; //shared default credential cache
36  static krb5_principal fgClient; //client principal
37 
38  TKSocket(TSocket *s = 0);
39 
40 public:
41  ~TKSocket();
42 
43  enum EEncoding { kNone = 0, kSafe = 1, kPriv = 2 };
44 
45  struct Desc_t {
48  };
49 
50  Int_t BlockRead(char *&buf, EEncoding &type);
51  Int_t BlockWrite(const char *buf, Int_t len, EEncoding type);
52 
53  static TKSocket *Connect(const char *server, Int_t port);
54 
55  ClassDef(TKSocket,0) // General kerberized socket
56 };
57 
58 #endif
static krb5_principal fgClient
Definition: TKSocket.h:36
krb5_principal fServer
Definition: TKSocket.h:31
static krb5_ccache fgCCDef
Definition: TKSocket.h:35
Short_t fType
Definition: TKSocket.h:47
int Int_t
Definition: RtypesCore.h:41
Int_t BlockRead(char *&buf, EEncoding &type)
Read block on information from server.
Definition: TKSocket.cxx:259
krb5_auth_context fAuthContext
Definition: TKSocket.h:32
#define ClassDef(name, id)
Definition: Rtypes.h:320
Short_t fLength
Definition: TKSocket.h:46
static krb5_context fgContext
Definition: TKSocket.h:34
static TKSocket * Connect(const char *server, Int_t port)
Connect to 'server' on 'port'.
Definition: TKSocket.cxx:180
TSocket * fSocket
Definition: TKSocket.h:30
short Short_t
Definition: RtypesCore.h:35
int type
Definition: TGX11.cxx:120
~TKSocket()
Destructor.
Definition: TKSocket.cxx:170
static constexpr double s
Mother of all ROOT objects.
Definition: TObject.h:37
Int_t BlockWrite(const char *buf, Int_t len, EEncoding type)
Block-send 'length' bytes to server from 'buf'.
Definition: TKSocket.cxx:325
TKSocket(TSocket *s=0)
Constructor.
Definition: TKSocket.cxx:162