ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_Krb5Auth
10 #include "Krb5Auth.h"
11 #endif
12 
13 #else
14 
15 typedef void* krb5_principal;
16 typedef void* krb5_auth_context;
17 typedef void* krb5_context;
18 typedef void* krb5_ccache;
19 typedef void* krb5_principal;
20 
21 #endif
22 
23 #ifndef ROOT_TObject
24 #include "TObject.h"
25 #endif
26 
27 
28 class TSocket;
29 
30 
31 class TKSocket : public TObject {
32 
33 private:
34  TSocket *fSocket; //underlying socket
35  krb5_principal fServer; //server principal
36  krb5_auth_context fAuthContext; //per connection kerberos authentication context
37 
38  static krb5_context fgContext; //shared kerberos context
39  static krb5_ccache fgCCDef; //shared default credential cache
40  static krb5_principal fgClient; //client principal
41 
42  TKSocket(TSocket *s = 0);
43 
44 public:
45  ~TKSocket();
46 
47  enum EEncoding { kNone = 0, kSafe = 1, kPriv = 2 };
48 
49  struct Desc_t {
52  };
53 
54  Int_t BlockRead(char *&buf, EEncoding &type);
55  Int_t BlockWrite(const char *buf, Int_t len, EEncoding type);
56 
57  static TKSocket *Connect(const char *server, Int_t port);
58 
59  ClassDef(TKSocket,0) // General kerberized socket
60 };
61 
62 #endif
static krb5_principal fgClient
Definition: TKSocket.h:40
krb5_principal fServer
Definition: TKSocket.h:35
static krb5_ccache fgCCDef
Definition: TKSocket.h:39
Short_t fType
Definition: TKSocket.h:51
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:36
#define ClassDef(name, id)
Definition: Rtypes.h:254
Short_t fLength
Definition: TKSocket.h:50
static krb5_context fgContext
Definition: TKSocket.h:38
static TKSocket * Connect(const char *server, Int_t port)
Connect to 'server' on 'port'.
Definition: TKSocket.cxx:180
TSocket * fSocket
Definition: TKSocket.h:34
short Short_t
Definition: RtypesCore.h:35
int type
Definition: TGX11.cxx:120
~TKSocket()
Destructor.
Definition: TKSocket.cxx:170
Mother of all ROOT objects.
Definition: TObject.h:58
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