Merge pull request #8 from 2nd-Layer/disable_unix_socket_on_non-unix_system
feat: Disable Unix socket on non-unix platforms
This commit is contained in:
commit
acd28b23da
1 changed files with 2 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
use byteorder::{ByteOrder, NetworkEndian, WriteBytesExt};
|
use byteorder::{ByteOrder, NetworkEndian, WriteBytesExt};
|
||||||
use log::{debug, log_enabled, trace};
|
use log::{debug, log_enabled, trace};
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
use std::os::unix::net::UnixStream;
|
use std::os::unix::net::UnixStream;
|
||||||
use std::{net::TcpStream, time::Instant};
|
use std::{net::TcpStream, time::Instant};
|
||||||
|
|
||||||
|
|
@ -78,6 +79,7 @@ impl Bearer for TcpStream {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
impl Bearer for UnixStream {
|
impl Bearer for UnixStream {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
self.try_clone().unwrap()
|
self.try_clone().unwrap()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue