tower-rs / tower-h2

An HTTP/2.0 client and server `Service` implementation.
MIT License
89 stars 18 forks source link

Add ConnectService and remove tokio_connect::Connect #48

Closed LucioFranco closed 5 years ago

LucioFranco commented 5 years ago

This change adds an initial implementation of a ConnectService trait alias that allows for the Connect phase to be abstracted away as a service. Currently, the address supplied to the underlying service is open so this leaves room for additional ways to "connect" to a service.

cc @carllerche

LucioFranco commented 5 years ago

@carllerche I've moved the connection aspect of the tests and examples to now just be a service that maps A -> AsyncWrite + AsyncRead where A can be anything.

LucioFranco commented 5 years ago

closing this and gonna redo this with the new tower_util::MakeConnection