Skip to content

Commit cd68dd1

Browse files
committed
std: Reassign seqpacket support to "unix_socket_seqpacket" feature
1 parent 5f7a979 commit cd68dd1

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

src/libstd/sys/unix/ext/net.rs

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,10 +1496,10 @@ impl IntoRawFd for UnixDatagram {
14961496
/// }
14971497
/// }
14981498
/// ```
1499-
#[unstable(feature = "unix_socket", issue = "0")]
1499+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
15001500
pub struct UnixSeqpacketListener(Socket);
15011501

1502-
#[unstable(feature = "unix_socket", issue = "0")]
1502+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
15031503
impl fmt::Debug for UnixSeqpacketListener {
15041504
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
15051505
let mut builder = fmt.debug_struct("UnixSeqpacketListener");
@@ -1528,7 +1528,7 @@ impl UnixSeqpacketListener {
15281528
/// }
15291529
/// };
15301530
/// ```
1531-
#[unstable(feature = "unix_socket", issue = "0")]
1531+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
15321532
pub fn bind<P: AsRef<Path>>(path: P) -> io::Result<UnixSeqpacketListener> {
15331533
fn inner(path: &Path) -> io::Result<UnixSeqpacketListener> {
15341534
unsafe {
@@ -1565,7 +1565,7 @@ impl UnixSeqpacketListener {
15651565
/// Err(e) => println!("accept function failed: {:?}", e),
15661566
/// }
15671567
/// ```
1568-
#[unstable(feature = "unix_socket", issue = "0")]
1568+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
15691569
pub fn accept(&self) -> io::Result<(UnixSeqpacket, SocketAddr)> {
15701570
let mut storage: libc::sockaddr_un = unsafe { mem::zeroed() };
15711571
let mut len = mem::size_of_val(&storage) as libc::socklen_t;
@@ -1590,7 +1590,7 @@ impl UnixSeqpacketListener {
15901590
///
15911591
/// let listener_copy = listener.try_clone().expect("try_clone failed");
15921592
/// ```
1593-
#[unstable(feature = "unix_socket", issue = "0")]
1593+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
15941594
pub fn try_clone(&self) -> io::Result<UnixSeqpacketListener> {
15951595
self.0.duplicate().map(UnixSeqpacketListener)
15961596
}
@@ -1607,7 +1607,7 @@ impl UnixSeqpacketListener {
16071607
///
16081608
/// let addr = listener.local_addr().expect("Couldn't get local address");
16091609
/// ```
1610-
#[unstable(feature = "unix_socket", issue = "0")]
1610+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16111611
pub fn local_addr(&self) -> io::Result<SocketAddr> {
16121612
SocketAddr::new(|addr, len| unsafe { libc::getsockname(*self.0.as_inner(), addr, len) })
16131613
}
@@ -1624,7 +1624,7 @@ impl UnixSeqpacketListener {
16241624
///
16251625
/// listener.set_nonblocking(true).expect("Couldn't set non blocking");
16261626
/// ```
1627-
#[unstable(feature = "unix_socket", issue = "0")]
1627+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16281628
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
16291629
self.0.set_nonblocking(nonblocking)
16301630
}
@@ -1643,7 +1643,7 @@ impl UnixSeqpacketListener {
16431643
/// println!("Got error: {:?}", err);
16441644
/// }
16451645
/// ```
1646-
#[unstable(feature = "unix_socket", issue = "0")]
1646+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16471647
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
16481648
self.0.take_error()
16491649
}
@@ -1680,34 +1680,34 @@ impl UnixSeqpacketListener {
16801680
/// }
16811681
/// }
16821682
/// ```
1683-
#[unstable(feature = "unix_socket", issue = "0")]
1683+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16841684
pub fn incoming<'a>(&'a self) -> IncomingSeqpacket<'a> {
16851685
IncomingSeqpacket { listener: self }
16861686
}
16871687
}
16881688

1689-
#[unstable(feature = "unix_socket", issue = "0")]
1689+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16901690
impl AsRawFd for UnixSeqpacketListener {
16911691
fn as_raw_fd(&self) -> RawFd {
16921692
*self.0.as_inner()
16931693
}
16941694
}
16951695

1696-
#[unstable(feature = "unix_socket", issue = "0")]
1696+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
16971697
impl FromRawFd for UnixSeqpacketListener {
16981698
unsafe fn from_raw_fd(fd: RawFd) -> UnixSeqpacketListener {
16991699
UnixSeqpacketListener(Socket::from_inner(fd))
17001700
}
17011701
}
17021702

1703-
#[unstable(feature = "unix_socket", issue = "0")]
1703+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17041704
impl IntoRawFd for UnixSeqpacketListener {
17051705
fn into_raw_fd(self) -> RawFd {
17061706
self.0.into_inner()
17071707
}
17081708
}
17091709

1710-
#[unstable(feature = "unix_socket", issue = "0")]
1710+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17111711
impl<'a> IntoIterator for &'a UnixSeqpacketListener {
17121712
type Item = io::Result<UnixSeqpacket>;
17131713
type IntoIter = IncomingSeqpacket<'a>;
@@ -1749,12 +1749,12 @@ impl<'a> IntoIterator for &'a UnixSeqpacketListener {
17491749
/// }
17501750
/// ```
17511751
#[derive(Debug)]
1752-
#[unstable(feature = "unix_socket", issue = "0")]
1752+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17531753
pub struct IncomingSeqpacket<'a> {
17541754
listener: &'a UnixSeqpacketListener,
17551755
}
17561756

1757-
#[unstable(feature = "unix_socket", issue = "0")]
1757+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17581758
impl<'a> Iterator for IncomingSeqpacket<'a> {
17591759
type Item = io::Result<UnixSeqpacket>;
17601760

@@ -1785,10 +1785,10 @@ impl<'a> Iterator for IncomingSeqpacket<'a> {
17851785
/// let count = socket.recv(&mut buf).unwrap();
17861786
/// println!("socket {:?} sent {:?}", path, &buf[..count]);
17871787
/// ```
1788-
#[unstable(feature = "unix_socket", issue = "0")]
1788+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17891789
pub struct UnixSeqpacket(Socket);
17901790

1791-
#[unstable(feature = "unix_socket", issue = "0")]
1791+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
17921792
impl fmt::Debug for UnixSeqpacket {
17931793
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
17941794
let mut builder = fmt.debug_struct("UnixSeqpacket");
@@ -1820,7 +1820,7 @@ impl UnixSeqpacket {
18201820
/// }
18211821
/// };
18221822
/// ```
1823-
#[unstable(feature = "unix_socket", issue = "0")]
1823+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
18241824
pub fn connect<P: AsRef<Path>>(path: P) -> io::Result<UnixSeqpacket> {
18251825
fn inner(path: &Path) -> io::Result<UnixSeqpacket> {
18261826
unsafe {
@@ -1852,7 +1852,7 @@ impl UnixSeqpacket {
18521852
/// }
18531853
/// };
18541854
/// ```
1855-
#[unstable(feature = "unix_socket", issue = "0")]
1855+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
18561856
pub fn pair() -> io::Result<(UnixSeqpacket, UnixSeqpacket)> {
18571857
let (i1, i2) = Socket::new_pair(libc::AF_UNIX, libc::SOCK_SEQPACKET)?;
18581858
Ok((UnixSeqpacket(i1), UnixSeqpacket(i2)))
@@ -1874,7 +1874,7 @@ impl UnixSeqpacket {
18741874
///
18751875
/// let sock_copy = socket.try_clone().expect("try_clone failed");
18761876
/// ```
1877-
#[unstable(feature = "unix_socket", issue = "0")]
1877+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
18781878
pub fn try_clone(&self) -> io::Result<UnixSeqpacket> {
18791879
self.0.duplicate().map(UnixSeqpacket)
18801880
}
@@ -1891,7 +1891,7 @@ impl UnixSeqpacket {
18911891
///
18921892
/// let addr = socket.local_addr().expect("Couldn't get local address");
18931893
/// ```
1894-
#[unstable(feature = "unix_socket", issue = "0")]
1894+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
18951895
pub fn local_addr(&self) -> io::Result<SocketAddr> {
18961896
SocketAddr::new(|addr, len| unsafe { libc::getsockname(*self.0.as_inner(), addr, len) })
18971897
}
@@ -1908,7 +1908,7 @@ impl UnixSeqpacket {
19081908
///
19091909
/// let addr = socket.peer_addr().expect("Couldn't get peer address");
19101910
/// ```
1911-
#[unstable(feature = "unix_socket", issue = "0")]
1911+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
19121912
pub fn peer_addr(&self) -> io::Result<SocketAddr> {
19131913
SocketAddr::new(|addr, len| unsafe { libc::getpeername(*self.0.as_inner(), addr, len) })
19141914
}
@@ -1927,7 +1927,7 @@ impl UnixSeqpacket {
19271927
/// let mut buf = vec![0; 10];
19281928
/// socket.recv(buf.as_mut_slice()).expect("recv function failed");
19291929
/// ```
1930-
#[unstable(feature = "unix_socket", issue = "0")]
1930+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
19311931
pub fn recv(&self, buf: &mut [u8]) -> io::Result<usize> {
19321932
self.0.read(buf)
19331933
}
@@ -1945,7 +1945,7 @@ impl UnixSeqpacket {
19451945
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
19461946
/// socket.send(b"omelette au fromage").expect("send_to function failed");
19471947
/// ```
1948-
#[unstable(feature = "unix_socket", issue = "0")]
1948+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
19491949
pub fn send(&self, buf: &[u8]) -> io::Result<usize> {
19501950
self.0.write(buf)
19511951
}
@@ -1988,7 +1988,7 @@ impl UnixSeqpacket {
19881988
/// let err = result.unwrap_err();
19891989
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
19901990
/// ```
1991-
#[unstable(feature = "unix_socket", issue = "0")]
1991+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
19921992
pub fn set_read_timeout(&self, timeout: Option<Duration>) -> io::Result<()> {
19931993
self.0.set_timeout(timeout, libc::SO_RCVTIMEO)
19941994
}
@@ -2030,7 +2030,7 @@ impl UnixSeqpacket {
20302030
/// let err = result.unwrap_err();
20312031
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
20322032
/// ```
2033-
#[unstable(feature = "unix_socket", issue = "0")]
2033+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
20342034
pub fn set_write_timeout(&self, timeout: Option<Duration>) -> io::Result<()> {
20352035
self.0.set_timeout(timeout, libc::SO_SNDTIMEO)
20362036
}
@@ -2049,7 +2049,7 @@ impl UnixSeqpacket {
20492049
/// .expect("set_read_timeout function failed");
20502050
/// assert_eq!(socket.read_timeout().unwrap(), Some(Duration::new(1, 0)));
20512051
/// ```
2052-
#[unstable(feature = "unix_socket", issue = "0")]
2052+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
20532053
pub fn read_timeout(&self) -> io::Result<Option<Duration>> {
20542054
self.0.timeout(libc::SO_RCVTIMEO)
20552055
}
@@ -2068,7 +2068,7 @@ impl UnixSeqpacket {
20682068
/// .expect("set_write_timeout function failed");
20692069
/// assert_eq!(socket.write_timeout().unwrap(), Some(Duration::new(1, 0)));
20702070
/// ```
2071-
#[unstable(feature = "unix_socket", issue = "0")]
2071+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
20722072
pub fn write_timeout(&self) -> io::Result<Option<Duration>> {
20732073
self.0.timeout(libc::SO_SNDTIMEO)
20742074
}
@@ -2084,7 +2084,7 @@ impl UnixSeqpacket {
20842084
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
20852085
/// socket.set_nonblocking(true).expect("set_nonblocking function failed");
20862086
/// ```
2087-
#[unstable(feature = "unix_socket", issue = "0")]
2087+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
20882088
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> {
20892089
self.0.set_nonblocking(nonblocking)
20902090
}
@@ -2102,7 +2102,7 @@ impl UnixSeqpacket {
21022102
/// println!("Got error: {:?}", err);
21032103
/// }
21042104
/// ```
2105-
#[unstable(feature = "unix_socket", issue = "0")]
2105+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
21062106
pub fn take_error(&self) -> io::Result<Option<io::Error>> {
21072107
self.0.take_error()
21082108
}
@@ -2123,27 +2123,27 @@ impl UnixSeqpacket {
21232123
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
21242124
/// socket.shutdown(Shutdown::Both).expect("shutdown function failed");
21252125
/// ```
2126-
#[unstable(feature = "unix_socket", issue = "0")]
2126+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
21272127
pub fn shutdown(&self, how: Shutdown) -> io::Result<()> {
21282128
self.0.shutdown(how)
21292129
}
21302130
}
21312131

2132-
#[unstable(feature = "unix_socket", issue = "0")]
2132+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
21332133
impl AsRawFd for UnixSeqpacket {
21342134
fn as_raw_fd(&self) -> RawFd {
21352135
*self.0.as_inner()
21362136
}
21372137
}
21382138

2139-
#[unstable(feature = "unix_socket", issue = "0")]
2139+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
21402140
impl FromRawFd for UnixSeqpacket {
21412141
unsafe fn from_raw_fd(fd: RawFd) -> UnixSeqpacket {
21422142
UnixSeqpacket(Socket::from_inner(fd))
21432143
}
21442144
}
21452145

2146-
#[unstable(feature = "unix_socket", issue = "0")]
2146+
#[unstable(feature = "unix_socket_seqpacket", issue = "0")]
21472147
impl IntoRawFd for UnixSeqpacket {
21482148
fn into_raw_fd(self) -> RawFd {
21492149
self.0.into_inner()

0 commit comments

Comments
 (0)