소스 검색

communicator: enable nodelay for tcp streams

Lennart Braun 2 년 전
부모
커밋
d079eb6bef
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      communicator/src/tcp.rs

+ 3 - 0
communicator/src/tcp.rs

@@ -175,6 +175,9 @@ pub fn make_tcp_communicator(
 ) -> Result<impl AbstractCommunicator, Error> {
     // create connections with other parties
     let stream_map = setup_connection(num_parties, my_id, options)?;
+    stream_map
+        .iter()
+        .for_each(|(_, s)| s.set_nodelay(true).expect("set_nodelay failed"));
     // use streams as reader/writer pairs
     let rw_map = stream_map
         .into_iter()