Skip to content

Commit

Permalink
Don't use writev API on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed Mar 8, 2019
1 parent 2f1ce3a commit 3487853
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rustls-mio/examples/tlsclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ impl TlsClient {
}
}

#[cfg(target_os = "windows")]
fn do_write(&mut self) {
self.tls_session.write_tls(&mut self.socket).unwrap();
}

#[cfg(not(target_os = "windows"))]
fn do_write(&mut self) {
self.tls_session.writev_tls(&mut WriteVAdapter::new(&mut self.socket)).unwrap();
}
Expand Down

0 comments on commit 3487853

Please sign in to comment.