Subversion Repositories tpanel

Rev

Rev 446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 446 Rev 464
Line 37... Line 37...
37
        size_t readAbsolut(char *buffer, size_t size);
37
        size_t readAbsolut(char *buffer, size_t size);
38
        size_t send(char *buffer, size_t size);
38
        size_t send(char *buffer, size_t size);
39
        bool close();
39
        bool close();
40
        bool isConnected() { return mConnected; }
40
        bool isConnected() { return mConnected; }
41
        std::string& getMyIP() { return mMyIP; }
41
        std::string& getMyIP() { return mMyIP; }
-
 
42
        std::string& getMyHostName() { return mMyHostName; }
-
 
43
        std::string& getMyNetmask() { return mMyNetmask; }
42
        int retrieveSSLerror(int rcode) { return SSL_get_error(mSsl, rcode); }
44
        int retrieveSSLerror(int rcode) { return SSL_get_error(mSsl, rcode); }
43
        int getSocket() { return mSockfd; }
45
        int getSocket() { return mSockfd; }
44
 
46
 
45
        static const size_t npos = static_cast<size_t>(-1);
47
        static const size_t npos = static_cast<size_t>(-1);
46
 
48
 
Line 48... Line 50...
48
        struct addrinfo *lookup_host (const std::string& host, int port);
50
        struct addrinfo *lookup_host (const std::string& host, int port);
49
        void initSSL();
51
        void initSSL();
50
        SSL_CTX *initCTX();
52
        SSL_CTX *initCTX();
51
        void log_ssl_error();
53
        void log_ssl_error();
52
        bool isSockValid();
54
        bool isSockValid();
-
 
55
        bool getHost();
53
 
56
 
54
    private:
57
    private:
55
        std::string mHost;
58
        std::string mHost;
56
        int mPort{0};
59
        int mPort{0};
57
        int mSockfd{-1};
60
        int mSockfd{-1};
Line 61... Line 64...
61
        SSL_CTX *mCtx{nullptr};
64
        SSL_CTX *mCtx{nullptr};
62
        SSL *mSsl{nullptr};
65
        SSL *mSsl{nullptr};
63
        std::string mUser;
66
        std::string mUser;
64
        std::string mPassword;
67
        std::string mPassword;
65
        std::string mMyIP;
68
        std::string mMyIP;
-
 
69
        std::string mMyHostName;
-
 
70
        std::string mMyNetmask;
66
};
71
};
67
 
72
 
68
#endif
73
#endif