Skip to content

SSLConnection

[Source]

Wrap another protocol in an SSL connection.

A finished handshake reaches the wrapped protocol as connected on a session that connected out, or accepted on one that was connected to. A failed one reaches it as auth_failed when the session is in SSLAuthFail, and as nothing at all when the session is in SSLError. The connection closes on either failure. SSLAuthFail and SSLError each list the failures they cover.

class ref SSLConnection is
  TCPConnectionNotify ref

Implements


Constructors

create

[Source]

Initialise with a wrapped protocol and an SSL session.

new iso create(
  notify: TCPConnectionNotify iso,
  ssl: SSL iso)
: SSLConnection iso^

Parameters

Returns


Public Functions

accepted

[Source]

Swallow this event until the handshake is complete.

fun ref accepted(
  conn: TCPConnection ref)
: None val

Parameters

Returns


connecting

[Source]

Forward to the wrapped protocol.

fun ref connecting(
  conn: TCPConnection ref,
  count: U32 val)
: None val

Parameters

Returns


connected

[Source]

Swallow this event until the handshake is complete.

fun ref connected(
  conn: TCPConnection ref)
: None val

Parameters

Returns


connect_failed

[Source]

Forward to the wrapped protocol.

fun ref connect_failed(
  conn: TCPConnection ref)
: None val

Parameters

Returns


sent

[Source]

Pass the data to the SSL session and check for both new application data and new destination data.

fun ref sent(
  conn: TCPConnection ref,
  data: ByteSeq)
: ByteSeq

Parameters

Returns


sentv

[Source]

Pass each sequence to the SSL session and check for both new application data and new destination data. Returns an empty sequence: what leaves the connection is the ciphertext _poll writes, not these bytes.

fun ref sentv(
  conn: TCPConnection ref,
  data: ByteSeqIter val)
: ByteSeqIter val

Parameters

Returns


received

[Source]

Pass the data to the SSL session and check for both new application data and new destination data.

fun ref received(
  conn: TCPConnection ref,
  data: Array[U8 val] iso,
  times: USize val)
: Bool val

Parameters

Returns


expect

[Source]

Keep track of the expect count for the wrapped protocol. Always tell the TCPConnection to read all available data.

fun ref expect(
  conn: TCPConnection ref,
  qty: USize val)
: USize val

Parameters

Returns


closed

[Source]

Forward to the wrapped protocol.

fun ref closed(
  conn: TCPConnection ref)
: None val

Parameters

Returns


throttled

[Source]

Forward to the wrapped protocol.

fun ref throttled(
  conn: TCPConnection ref)
: None val

Parameters

Returns


unthrottled

[Source]

Forward to the wrapped protocol.

fun ref unthrottled(
  conn: TCPConnection ref)
: None val

Parameters

Returns


proxy_via

[Source]

fun ref proxy_via(
  host: String val,
  service: String val)
: (String val , String val)

Parameters

Returns


auth_failed

[Source]

fun ref auth_failed(
  conn: TCPConnection ref)
: None val

Parameters

Returns