mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-27 04:08:27 +08:00
firmware: Disable the Nagle algorithm on sockets
Signed-off-by: Michael Birtwell <michael.birtwell@oxionics.com>
This commit is contained in:
parent
bca30becbf
commit
82505a2203
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user