stream_peer_ssl.h
1 #ifndef STREAM_PEER_SSL_H
2 #define STREAM_PEER_SSL_H
3 
4 #include "io/stream_peer.h"
5 
6 class StreamPeerSSL : public StreamPeer {
7  OBJ_TYPE(StreamPeerSSL,StreamPeer);
8 protected:
9  static StreamPeerSSL* (*_create)();
10  static void _bind_methods();
11 public:
12 
13  enum Status {
14  STATUS_DISCONNECTED,
15  STATUS_CONNECTED,
16  STATUS_ERROR_NO_CERTIFICATE,
17  STATUS_ERROR_HOSTNAME_MISMATCH
18  };
19 
20  virtual Error accept(Ref<StreamPeer> p_base)=0;
21  virtual Error connect(Ref<StreamPeer> p_base,bool p_validate_certs=false,const String& p_for_hostname=String())=0;
22  virtual Status get_status() const=0;
23 
24  virtual void disconnect()=0;
25 
26  static StreamPeerSSL* create();
27 
28 
29  StreamPeerSSL();
30 };
31 
32 VARIANT_ENUM_CAST( StreamPeerSSL::Status );
33 
34 #endif // STREAM_PEER_SSL_H
Definition: stream_peer_ssl.h:6
Definition: stream_peer.h:34
Definition: ustring.h:64