SSL Stream peer.
    public class StreamPeerSSL : StreamPeer

SSL Stream peer. This object can be used to connect to SSL servers.

Inheritance Chain

Constructors

    public StreamPeerSSL()

Properties

    public bool BlockingHandshake { get; set; }

Methods

    public Error AcceptStream(StreamPeer @base)

    public Error ConnectToStream(StreamPeer stream, bool validateCerts = false, string forHostname = "")

Connect to a peer using an underlying StreamPeer “stream”, when “validate_certs” is true, StreamPeerSSL will validate that the certificate presented by the peer matches the “for_hostname”.

    public void DisconnectFromStream()

Disconnect from host.

    public Status GetStatus()

Return the status of the connection, one of STATUS_* enum.

    public bool IsBlockingHandshakeEnabled()

Getter for BlockingHandshake

    public void Poll()

Poll the connection to check for incoming bytes. Call this right before “get_available_bytes()” for it to work properly.

    public void SetBlockingHandshakeEnabled(bool enabled)

Setter for BlockingHandshake

Inner Types

Status

Name Value Description
Disconnected 0 A status representing a [code]StreamPeerSSL[/code] that is disconnected.
Handshaking 1  
Connected 2 A status representing a [code]StreamPeerSSL[/code] that is connected to a host.
Error 3  
ErrorHostnameMismatch 4 An error status that shows a mismatch in the SSL certificate domain presented by the host and the domain requested for validation.
Tags: