Merge pull request #120 from nymtech/feature/tokio_tungstenite_dependency_fix
Feature/tokio tungstenite dependency fix
This commit is contained in:
Generated
+25
-15
@@ -878,7 +878,7 @@ dependencies = [
|
||||
"bytes 0.4.12",
|
||||
"fnv",
|
||||
"futures 0.1.29",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"indexmap",
|
||||
"log",
|
||||
"slab",
|
||||
@@ -963,6 +963,17 @@ dependencies = [
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b"
|
||||
dependencies = [
|
||||
"bytes 0.5.4",
|
||||
"fnv",
|
||||
"itoa",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "http-body"
|
||||
version = "0.1.0"
|
||||
@@ -971,7 +982,7 @@ checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
|
||||
dependencies = [
|
||||
"bytes 0.4.12",
|
||||
"futures 0.1.29",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"tokio-buf",
|
||||
]
|
||||
|
||||
@@ -1000,7 +1011,7 @@ dependencies = [
|
||||
"futures 0.1.29",
|
||||
"futures-cpupool",
|
||||
"h2",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"http-body",
|
||||
"httparse",
|
||||
"iovec",
|
||||
@@ -1066,11 +1077,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "input_buffer"
|
||||
version = "0.2.0"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e1b822cc844905551931d6f81608ed5f50a79c1078a4e2b4d42dbc7c1eedfbf"
|
||||
checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754"
|
||||
dependencies = [
|
||||
"bytes 0.4.12",
|
||||
"bytes 0.5.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1437,7 +1448,6 @@ dependencies = [
|
||||
"tokio 0.2.10",
|
||||
"tokio-tungstenite",
|
||||
"topology",
|
||||
"tungstenite",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2024,7 +2034,7 @@ dependencies = [
|
||||
"encoding_rs",
|
||||
"flate2",
|
||||
"futures 0.1.29",
|
||||
"http",
|
||||
"http 0.1.21",
|
||||
"hyper",
|
||||
"hyper-tls",
|
||||
"log",
|
||||
@@ -2562,8 +2572,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio-tungstenite"
|
||||
version = "0.10.0"
|
||||
source = "git+https://github.com/snapview/tokio-tungstenite?rev=308d9680c0e59dd1e8651659a775c05df937934e#308d9680c0e59dd1e8651659a775c05df937934e"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8b8fe88007ebc363512449868d7da4389c9400072a3f666f212c7280082882a"
|
||||
dependencies = [
|
||||
"futures 0.3.1",
|
||||
"log",
|
||||
@@ -2613,18 +2624,17 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tungstenite"
|
||||
version = "0.9.2"
|
||||
version = "0.10.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a0c2bd5aeb7dcd2bb32e472c8872759308495e5eccc942e929a513cd8d36110"
|
||||
checksum = "cfea31758bf674f990918962e8e5f07071a3161bd7c4138ed23e416e1ac4264e"
|
||||
dependencies = [
|
||||
"base64 0.11.0",
|
||||
"byteorder",
|
||||
"bytes 0.4.12",
|
||||
"http",
|
||||
"bytes 0.5.4",
|
||||
"http 0.2.0",
|
||||
"httparse",
|
||||
"input_buffer",
|
||||
"log",
|
||||
"native-tls",
|
||||
"rand 0.7.3",
|
||||
"sha-1",
|
||||
"url 2.1.1",
|
||||
|
||||
@@ -25,7 +25,7 @@ reqwest = "0.9.22"
|
||||
serde = { version = "1.0.104", features = ["derive"] }
|
||||
serde_json = "1.0.44"
|
||||
tokio = { version = "0.2", features = ["full"] }
|
||||
tungstenite = "0.9.2"
|
||||
tokio-tungstenite = "0.10.1"
|
||||
|
||||
## internal
|
||||
addressing = {path = "../common/addressing" }
|
||||
@@ -43,9 +43,6 @@ topology = {path = "../common/topology" }
|
||||
sphinx = { git = "https://github.com/nymtech/sphinx", rev="5862939c52e4dd76f836856a01787faec32152b4" }
|
||||
# sphinx = { path = "../../sphinx"}
|
||||
|
||||
# putting this explicitly below everything and most likely, the next time we look into it, it will already have a proper release
|
||||
tokio-tungstenite = { git = "https://github.com/snapview/tokio-tungstenite", rev="308d9680c0e59dd1e8651659a775c05df937934e" }
|
||||
|
||||
[build-dependencies]
|
||||
built = "0.3.2"
|
||||
|
||||
|
||||
@@ -304,6 +304,7 @@ pub async fn start_tcpsocket<T: 'static + NymTopology>(
|
||||
topology: TopologyInnerRef<T>,
|
||||
) -> Result<(), TCPSocketError> {
|
||||
let address = SocketAddr::new("127.0.0.1".parse().unwrap(), listening_port);
|
||||
info!("Starting tcp socket listener at {:?}", address);
|
||||
let mut listener = tokio::net::TcpListener::bind(address).await?;
|
||||
|
||||
while let Ok((stream, _)) = listener.accept().await {
|
||||
|
||||
@@ -12,9 +12,9 @@ use sphinx::route::{Destination, DestinationAddressBytes};
|
||||
use std::convert::TryFrom;
|
||||
use std::io;
|
||||
use std::net::SocketAddr;
|
||||
use tokio_tungstenite::tungstenite::protocol::frame::coding::CloseCode;
|
||||
use tokio_tungstenite::tungstenite::protocol::{CloseFrame, Message};
|
||||
use topology::NymTopology;
|
||||
use tungstenite::protocol::frame::coding::CloseCode;
|
||||
use tungstenite::protocol::{CloseFrame, Message};
|
||||
|
||||
struct Connection<T: NymTopology> {
|
||||
address: SocketAddr,
|
||||
@@ -395,6 +395,7 @@ pub async fn start_websocket<T: 'static + NymTopology>(
|
||||
topology: TopologyInnerRef<T>,
|
||||
) -> Result<(), WebSocketError> {
|
||||
let address = SocketAddr::new("127.0.0.1".parse().unwrap(), listening_port);
|
||||
info!("Starting websocket listener at {:?}", address);
|
||||
let mut listener = tokio::net::TcpListener::bind(address).await?;
|
||||
|
||||
while let Ok((stream, _)) = listener.accept().await {
|
||||
|
||||
Reference in New Issue
Block a user