Warning, file /include/root/TServerSocket.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TServerSocket
0013 #define ROOT_TServerSocket
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include "TSocket.h"
0029 #include <string>
0030
0031 class TSeqCollection;
0032
0033 namespace ROOT::Deprecated {
0034
0035 typedef Int_t (*SrvAuth_t)(TSocket *sock, const char *, const char *,
0036 std::string&, Int_t &, Int_t &, std::string &,
0037 TSeqCollection *);
0038 typedef Int_t (*SrvClup_t)(TSeqCollection *);
0039
0040
0041 const UChar_t kSrvAuth = 0x1;
0042 const UChar_t kSrvNoAuth = (kSrvAuth<<4);
0043
0044 }
0045
0046 using SrvAuth_t R__DEPRECATED(6, 42, "Socket authentication is deprecated") = ROOT::Deprecated::SrvAuth_t;
0047 using SrvClup_t R__DEPRECATED(6, 42, "Socket authentication is deprecated") = ROOT::Deprecated::SrvClup_t;
0048 const UChar_t kSrvAuth R__DEPRECATED(6, 42, "Socket authentication is deprecated") = ROOT::Deprecated::kSrvAuth;
0049 const UChar_t kSrvNoAuth R__DEPRECATED(6, 42, "Socket authentication is deprecated") = ROOT::Deprecated::kSrvNoAuth;
0050
0051 class TServerSocket : public TSocket {
0052
0053 private:
0054 TSeqCollection *fSecContexts;
0055 static ROOT::Deprecated::SrvAuth_t fgSrvAuthHook;
0056 static ROOT::Deprecated::SrvClup_t fgSrvAuthClupHook;
0057 static UChar_t fgAcceptOpt;
0058
0059 TServerSocket() : fSecContexts(nullptr) {}
0060 TServerSocket(const TServerSocket &);
0061 void operator=(const TServerSocket &);
0062 Bool_t Authenticate(TSocket *);
0063
0064 public:
0065 enum { kDefaultBacklog = 10 };
0066
0067 TServerSocket(Int_t port, Bool_t reuse = kFALSE, Int_t backlog = kDefaultBacklog, Int_t tcpwindowsize = -1,
0068 ESocketBindOption socketBindOption = ESocketBindOption::kInaddrAny);
0069 TServerSocket(const char *service, Bool_t reuse = kFALSE,
0070 Int_t backlog = kDefaultBacklog, Int_t tcpwindowsize = -1);
0071 virtual ~TServerSocket();
0072
0073 virtual TSocket *Accept(UChar_t Opt = 0);
0074 TInetAddress GetLocalInetAddress() override;
0075 Int_t GetLocalPort() override;
0076
0077 Int_t Send(const TMessage &) override
0078 { MayNotUse("Send(const TMessage &)"); return 0; }
0079 Int_t Send(Int_t) override
0080 { MayNotUse("Send(Int_t)"); return 0; }
0081 Int_t Send(Int_t, Int_t) override
0082 { MayNotUse("Send(Int_t, Int_t)"); return 0; }
0083 Int_t Send(const char *, Int_t = kMESS_STRING) override
0084 { MayNotUse("Send(const char *, Int_t)"); return 0; }
0085 Int_t SendObject(const TObject *, Int_t = kMESS_OBJECT) override
0086 { MayNotUse("SendObject(const TObject *, Int_t)"); return 0; }
0087 Int_t SendRaw(const void *, Int_t, ESendRecvOptions = kDefault) override
0088 { MayNotUse("SendRaw(const void *, Int_t, ESendRecvOptions)"); return 0; }
0089 Int_t Recv(TMessage *&) override
0090 { MayNotUse("Recv(TMessage *&)"); return 0; }
0091 Int_t Recv(Int_t &, Int_t &) override
0092 { MayNotUse("Recv(Int_t &, Int_t &)"); return 0; }
0093 Int_t Recv(char *, Int_t) override
0094 { MayNotUse("Recv(char *, Int_t)"); return 0; }
0095 Int_t Recv(char *, Int_t, Int_t &) override
0096 { MayNotUse("Recv(char *, Int_t, Int_t &)"); return 0; }
0097 Int_t RecvRaw(void *, Int_t, ESendRecvOptions = kDefault) override
0098 { MayNotUse("RecvRaw(void *, Int_t, ESendRecvOptions)"); return 0; }
0099
0100 static UChar_t GetAcceptOptions() R__DEPRECATED(6, 42, "Socket authentication is deprecated");
0101 static void SetAcceptOptions(UChar_t Opt) R__DEPRECATED(6, 42, "Socket authentication is deprecated");
0102 static void ShowAcceptOptions() R__DEPRECATED(6, 42, "Socket authentication is deprecated");
0103
0104 ClassDefOverride(TServerSocket, 0);
0105 };
0106
0107 #endif