aquatic_ws: rewrite failing serialization, add tests

Use different approach to action fields and info_hash vec, fixing
failing tests
This commit is contained in:
Joakim Frostegård 2020-08-09 00:26:26 +02:00
parent c8512e1cdf
commit 0637f83daa
5 changed files with 311 additions and 250 deletions

View file

@ -193,7 +193,7 @@ pub fn run_handshakes_and_read_messages(
match established_ws.ws.read_message(){
Ok(ws_message) => {
if let Some(in_message) = InMessage::from_ws_message(ws_message){
if let Ok(in_message) = InMessage::from_ws_message(ws_message){
let naive_peer_addr = established_ws.peer_addr;
let converted_peer_ip = convert_ipv4_mapped_ipv6(
naive_peer_addr.ip()