2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-27 12:18:26 +08:00

firmware: Disable the Nagle algorithm on sockets

Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
This commit is contained in:
Mike Birtwell 2024-11-13 18:43:52 +00:00 committed by GitHub
parent bca30becbf
commit 82505a2203
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -402,16 +402,18 @@ impl<'a> TcpListener<'a> {
socket.may_send() || socket.may_recv()
})?;
let accepted = self.handle.get();
let accepted = TcpStream {
io: self.io,
handle: self.handle.get(),
};
accepted.with_lower(|s| s.set_nagle_enabled(false));
self.handle.set(Self::new_lower(self.io, self.buffer_size.get()));
match self.listen(self.endpoint.get()) {
Ok(()) => (),
_ => unreachable!()
}
Ok(TcpStream {
io: self.io,
handle: accepted
})
Ok(accepted)
}
pub fn close(&self) {