fix smth
This commit is contained in:
parent
67b2c20959
commit
871286221b
|
@ -94,7 +94,7 @@ async fn accept_client(stream: TcpStream, server_sender: SP) -> io::Result<()> {
|
||||||
|
|
||||||
pub fn responding_to_server(server_sender: SP, client_receiver: RP) -> io::Result<()> {
|
pub fn responding_to_server(server_sender: SP, client_receiver: RP) -> io::Result<()> {
|
||||||
while let Ok(res) = client_receiver.recv() {
|
while let Ok(res) = client_receiver.recv() {
|
||||||
println!("From SERVER!:\n {}", res.message);
|
println!("From Server!:\n {}", res.message);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ async fn accept_server(stream: TcpStream, client_sender: SP) -> io::Result<()> {
|
||||||
|
|
||||||
pub fn responding_to_client(client_sender: SP, server_receiver: RP) -> io::Result<()> {
|
pub fn responding_to_client(client_sender: SP, server_receiver: RP) -> io::Result<()> {
|
||||||
while let Ok(res) = server_receiver.recv() {
|
while let Ok(res) = server_receiver.recv() {
|
||||||
println!("From SERVER!:\n {}", res.message);
|
println!("From Client!:\n {}", res.message);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ use std::{
|
||||||
| | | | +----------------------+ | | +-----------------------------+ | | | |
|
| | | | +----------------------+ | | +-----------------------------+ | | | |
|
||||||
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
||||||
| | | | | Encode | | | | | | | | |
|
| | | | | Encode | | | | | | | | |
|
||||||
| | | | | <----------------------------- from JSON <-------------------------------- |
|
| <----------------------------- <----------------------------- from JSON <-------------------------------- |
|
||||||
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
||||||
| | | | +----------------------+ | | +-----------------------------+ | | | |
|
| | | | +----------------------+ | | +-----------------------------+ | | | |
|
||||||
+--------------+ | | | | | | | |
|
+--------------+ | | | | | | | |
|
||||||
|
|
Loading…
Reference in a new issue