Implement non blocking-handshake for StreamPeerSSL
This commit is contained in:
parent
1fc7973a00
commit
99d0b7ba14
4 changed files with 78 additions and 33 deletions
|
|
@ -49,14 +49,20 @@ protected:
|
|||
friend class Main;
|
||||
static bool initialize_certs;
|
||||
|
||||
bool blocking_handshake;
|
||||
|
||||
public:
|
||||
enum Status {
|
||||
STATUS_DISCONNECTED,
|
||||
STATUS_HANDSHAKING,
|
||||
STATUS_CONNECTED,
|
||||
STATUS_ERROR_NO_CERTIFICATE,
|
||||
STATUS_ERROR,
|
||||
STATUS_ERROR_HOSTNAME_MISMATCH
|
||||
};
|
||||
|
||||
void set_blocking_handshake_enabled(bool p_enabled);
|
||||
bool is_blocking_handshake_enabled() const;
|
||||
|
||||
virtual void poll() = 0;
|
||||
virtual Error accept_stream(Ref<StreamPeer> p_base) = 0;
|
||||
virtual Error connect_to_stream(Ref<StreamPeer> p_base, bool p_validate_certs = false, const String &p_for_hostname = String()) = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue