Skip to content

Commit

Permalink
Update prefer_socket option docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Sep 5, 2018
1 parent a565767 commit 0b6b1b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/conn/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ pub struct Opts {
///
/// Will reconnect via socket (or named pipe on windows) after TCP
/// connection to `127.0.0.1` if `true`.
///
/// Will fall back to TCP on error. Use `socket` option to enforce socket connection.
prefer_socket: bool,

/// Whether to enable `TCP_NODELAY` (defaults to `true`).
Expand Down Expand Up @@ -193,6 +195,8 @@ impl Opts {
///
/// Will reconnect via socket (or named pipe on windows) after TCP connection
/// to `127.0.0.1` if `true`.
///
/// Will fall back to TCP on error. Use `socket` option to enforce socket connection.
pub fn get_prefer_socket(&self) -> bool {
self.prefer_socket
}
Expand Down Expand Up @@ -406,6 +410,8 @@ impl OptsBuilder {
///
/// Will reconnect via socket (on named pipe on windows) after TCP connection
/// to `127.0.0.1` if `true`.
///
/// Will fall back to TCP on error. Use `socket` option to enforce socket connection.
pub fn prefer_socket(&mut self, prefer_socket: bool) -> &mut Self {
self.opts.prefer_socket = prefer_socket;
self
Expand Down

0 comments on commit 0b6b1b4

Please sign in to comment.