Skip to content

Provide a way to use pre-read data in TLS handshake #268

Description

@pgit

Use case: TCP server that detects TLS by inspecting the first few bytes of the accepted TCP connection, then do the TLS handshake if applicable.

In ASIO, there is an async_handshake overload that accepts buffers with pre-read data. Something similar seems to be missing in corosio. A custom stream type that supports "rewinding" or prepending a pre-read buffer could be another option.

But I guess the straightforward option is to allow passing a dynamic buffer, similar to capy::read_until.

This is closely related to #95

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions