Add code to create a client connected to the network
Some checks failed
Build library & run tests / build (push) Failing after 22s

This commit is contained in:
2024-06-22 12:57:41 +02:00
parent 1eaeb68d82
commit 15d44b6daa
5 changed files with 69 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ enum TestProtocol {
async fn main() {
let (qtx, qrx) = mpsc::channel(16);
let (atx, arx) = mpsc::channel(16);
let client = TestProtocolClient::new(qtx, arx);
let client = TestProtocolClient::new(qtx, arx, None);
let server = tokio::spawn(server_loop(qrx, atx));
let result = client.addition(2, 5).await.unwrap();
assert_eq!(result, 7);
@@ -91,7 +91,7 @@ async fn server_loop(
async fn heavy_async() {
let (qtx, qrx) = mpsc::channel(16);
let (atx, arx) = mpsc::channel(16);
let client = TestProtocolClient::new(qtx, arx);
let client = TestProtocolClient::new(qtx, arx, None);
let server = tokio::spawn(server_loop(qrx, atx));
let mut tasks = Vec::new();
for i in 0..100 {