Skip to content

Provide From<Message> for Request #1036

Closed
@alexcrichton

Description

@alexcrichton

I've taken most of the ideas learned here about spawning servers back to tokio-proto in tokio-rs/tokio-proto#135 and I believe the only remaining blocker for hyper being compatible with tokio-proto's TcpServer is the usage of SocketAddr in Hyper's request type. If this can be handled to implement From<Message> for Request then Hyper could leverage support in tokio-rs/tokio-proto#130 to use TcpServer directly, especially when working with TLS connections where Hyper's conveniences won't be available.

Talking with @carllerche over lunch today one idea was to have the socket address be a member of the messages coming from the Stream going into tokio-proto. That way the message itself would contain the socket address. I could imagine this being implemented via a trait bound in Hyper perhaps?

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions