File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ type Socket = WebSocketStream<MaybeTlsStream<TcpStream>>;
20
20
type Writer = SplitSink < Socket , protocol:: Message > ;
21
21
type Reader = SplitStream < Socket > ;
22
22
23
+ const PING_INTERVAL : Duration = Duration :: from_secs ( 50 ) ;
24
+ const PONG_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
25
+
23
26
pub async fn connect ( base_url : & BaseUrl ) -> Result < Socket > {
24
27
let url = format ! ( "ws{}/ws" , & BaseUrl :: get_url( base_url) [ 4 ..] ) ;
25
28
@@ -62,9 +65,6 @@ fn parse_message(message: protocol::Message) -> Result<Option<Message>> {
62
65
}
63
66
}
64
67
65
- const PING_INTERVAL : Duration = Duration :: from_secs ( 50 ) ;
66
- const PONG_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
67
-
68
68
pub async fn stream (
69
69
mut reader : Reader ,
70
70
writer : Arc < Mutex < Writer > > ,
You can’t perform that action at this time.
0 commit comments