Struct hyper_sync_rustls::ClientSession [] [src]

pub struct ClientSession { /* fields omitted */ }

This represents a single TLS client session.

Methods

impl ClientSession
[src]

[src]

Make a new ClientSession. config controls how we behave in the TLS protocol, hostname is the hostname of who we want to talk to.

Trait Implementations

impl Session for ClientSession
[src]

[src]

Read TLS content from rd. This method does internal buffering, so rd can supply TLS messages in arbitrary- sized chunks (like a socket or pipe might). Read more

[src]

Writes TLS messages to wr.

[src]

Processes any new packets read by a previous call to read_tls. Errors from this function relate to TLS protocol errors, and are fatal to the session. Future calls after an error will do no new work and will return the same error. Read more

[src]

Returns true if the caller should call read_tls as soon as possible. Read more

[src]

Returns true if the caller should call write_tls as soon as possible. Read more

[src]

Returns true if the session is currently perform the TLS handshake. During this time plaintext written to the session is buffered in memory. Read more

[src]

Sets a limit on the internal buffers used to buffer unsent plaintext (prior to completing the TLS handshake) and unsent TLS records. Read more

[src]

Queues a close_notify fatal alert to be sent in the next write_tls call. This informs the peer that the connection is being closed. Read more

[src]

Retrieves the certificate chain used by the peer to authenticate. Read more

[src]

Retrieves the protocol agreed with the peer via ALPN. Read more

[src]

Retrieves the protocol version agreed with the peer. Read more

[src]

This function uses io to complete any outstanding IO for this session. Read more

impl Debug for ClientSession
[src]

[src]

Formats the value using the given formatter.

impl Read for ClientSession
[src]

[src]

Obtain plaintext data received from the peer over this TLS connection.

[src]

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

1.0.0
[src]

Read all bytes until EOF in this source, placing them into buf. Read more

1.0.0
[src]

Read all bytes until EOF in this source, placing them into buf. Read more

1.6.0
[src]

Read the exact number of bytes required to fill buf. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Read. Read more

1.0.0
[src]

Transforms this Read instance to an [Iterator] over its bytes. Read more

[src]

🔬 This is a nightly-only experimental API. (io)

the semantics of a partial read/write of where errors happen is currently unclear and may change

Transforms this Read instance to an [Iterator] over [char]s. Read more

1.0.0
[src]

Creates an adaptor which will chain this stream with another. Read more

1.0.0
[src]

Creates an adaptor which will read at most limit bytes from it. Read more

impl Write for ClientSession
[src]

[src]

Send the plaintext buf to the peer, encrypting and authenticating it. Once this function succeeds you should call write_tls which will output the corresponding TLS records.

This function buffers plaintext sent before the TLS handshake completes, and sends it as soon as it can. This buffer is of unlimited size so writing much data before it can be sent will cause excess memory usage.

[src]

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

1.0.0
[src]

Attempts to write an entire buffer into this write. Read more

1.0.0
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Write. Read more