Skip to content

Commit 3eec435

Browse files
committed
Added skeleton of async WsUpgrade.
1 parent 5e79dea commit 3eec435

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/server/upgrade/async.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@ use stream::AsyncStream;
55
use futures::{Stream, Future};
66
use codec::http::HttpServerCodec;
77
use bytes::BytesMut;
8+
use client::async::ClientNew;
9+
10+
impl<S> WsUpgrade<S>
11+
where S: AsyncStream
12+
{
13+
pub fn async_accept(self) -> Result<ClientNew<S>, (S, io::Error)> {
14+
unimplemented!();
15+
}
16+
17+
pub fn async_accept_with(
18+
mut self,
19+
custom_headers: &Headers,
20+
) -> Result<ClientNew<S>, (S, io::Error)> {
21+
unimplemented!();
22+
}
23+
24+
pub fn async_reject(self) -> Result<S, (S, io::Error)> {
25+
unimplemented!();
26+
}
27+
28+
pub fn async_reject_with(mut self, headers: &Headers) -> Result<S, (S, io::Error)> {
29+
unimplemented!();
30+
}
31+
}
32+
833

934
pub trait AsyncIntoWs {
1035
/// The type of stream this upgrade process is working with (TcpStream, etc.)

0 commit comments

Comments
 (0)