diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-02-19 20:06:10 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-02-19 20:06:10 -0800 |
commit | 4eb739dcab2a1a79e1e0e60feddb0d9cc0d74108 (patch) | |
tree | da5786d14a71ebb1f961efd37586fcd15d430371 /src/protocol.rs | |
parent | 915acb1be8693f992afd7b5c82c2761c85b6b64d (diff) | |
download | geniza-4eb739dcab2a1a79e1e0e60feddb0d9cc0d74108.tar.gz geniza-4eb739dcab2a1a79e1e0e60feddb0d9cc0d74108.zip |
more WIP on synchronizer
Diffstat (limited to 'src/protocol.rs')
-rw-r--r-- | src/protocol.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/protocol.rs b/src/protocol.rs index 6e70dbb..35681e1 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -1,5 +1,5 @@ -use std::net::{TcpStream, ToSocketAddrs}; +use std::net::{TcpStream, ToSocketAddrs, Shutdown}; use std::time::Duration; use std::io::{Read, Write}; use std::cmp; @@ -395,4 +395,8 @@ impl DatConnection { trace!("\twas: {:?}", reg); Ok(reg) } + + pub fn close(&mut self) { + self.tcp.shutdown(Shutdown::Both); + } } |