StreamPeerSSL

    SSL stream peer.

    SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection.

    Tutorials

    Methods

    • STATUS_DISCONNECTED = 0 —- A status representing a StreamPeerSSL that is disconnected.
    • STATUS_HANDSHAKING = 1 —- A status representing a StreamPeerSSL during handshaking.
    • STATUS_CONNECTED = 2 —- A status representing a StreamPeerSSL that is connected to a host.
    • STATUS_ERROR_HOSTNAME_MISMATCH = 4 —- An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.

    Property Descriptions

    • bool blocking_handshake

    Accepts a peer connection as a server using the given private_key and providing the given certificate to the client. You can pass the optional chain parameter to provide additional CA chain information along with the certificate.


    • Error connect_to_stream ( stream, bool validate_certs=false, for_hostname=””, X509Certificate valid_certificate=null )

    Connects to a peer using an underlying stream. If is true, StreamPeerSSL will validate that the certificate presented by the peer matches the for_hostname.


    • void disconnect_from_stream ( )

    Disconnects from host.


    Returns the status of the connection. See Status for values.


    • void poll ( )