Skip to content

Commit

Permalink
Rename WaitRequest to ProxyRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka committed Oct 28, 2018
1 parent 2f3b4a7 commit 8c5966d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions transports/relay/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct RelayConfig {
pub enum RelayOutput<TStream> {
/// We are successfully connected as a dialer, and we can now request the remote to act as a
/// proxy.
WaitRequest(RelayWaitRequest<TStream>),
ProxyRequest(RelayProxyRequest<TStream>),
/// We have been asked to become a destination.
DestinationRequest(RelayDestinationRequest<TStream>),
/// We have been asked to relay communications to another node.
Expand All @@ -49,12 +49,12 @@ pub enum RelayOutput<TStream> {

/// We are successfully connected as a dialer, and we can now request the remote to act as a proxy.
#[must_use = "There is no point in opening a request if you don't use"]
pub struct RelayWaitRequest<TStream> {
pub struct RelayProxyRequest<TStream> {
/// The stream of the destination.
stream: Io<TStream>,
}

impl<TStream> RelayWaitRequest<TStream>
impl<TStream> RelayProxyRequest<TStream>
where TStream: AsyncRead + AsyncWrite + 'static
{
/// Request proxying to a destination.
Expand Down Expand Up @@ -227,7 +227,7 @@ where

fn upgrade(self, conn: C, _: (), endpoint: Endpoint) -> Self::Future {
if let Endpoint::Dialer = endpoint {
let future = future::ok(RelayOutput::WaitRequest(RelayWaitRequest {
let future = future::ok(RelayOutput::ProxyRequest(RelayProxyRequest {
stream: Io::new(conn),
}));
Box::new(future)
Expand Down

0 comments on commit 8c5966d

Please sign in to comment.