@@ -1496,10 +1496,10 @@ impl IntoRawFd for UnixDatagram {
1496
1496
/// }
1497
1497
/// }
1498
1498
/// ```
1499
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1499
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1500
1500
pub struct UnixSeqpacketListener ( Socket ) ;
1501
1501
1502
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1502
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1503
1503
impl fmt:: Debug for UnixSeqpacketListener {
1504
1504
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1505
1505
let mut builder = fmt. debug_struct ( "UnixSeqpacketListener" ) ;
@@ -1528,7 +1528,7 @@ impl UnixSeqpacketListener {
1528
1528
/// }
1529
1529
/// };
1530
1530
/// ```
1531
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1531
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1532
1532
pub fn bind < P : AsRef < Path > > ( path : P ) -> io:: Result < UnixSeqpacketListener > {
1533
1533
fn inner ( path : & Path ) -> io:: Result < UnixSeqpacketListener > {
1534
1534
unsafe {
@@ -1565,7 +1565,7 @@ impl UnixSeqpacketListener {
1565
1565
/// Err(e) => println!("accept function failed: {:?}", e),
1566
1566
/// }
1567
1567
/// ```
1568
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1568
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1569
1569
pub fn accept ( & self ) -> io:: Result < ( UnixSeqpacket , SocketAddr ) > {
1570
1570
let mut storage: libc:: sockaddr_un = unsafe { mem:: zeroed ( ) } ;
1571
1571
let mut len = mem:: size_of_val ( & storage) as libc:: socklen_t ;
@@ -1590,7 +1590,7 @@ impl UnixSeqpacketListener {
1590
1590
///
1591
1591
/// let listener_copy = listener.try_clone().expect("try_clone failed");
1592
1592
/// ```
1593
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1593
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1594
1594
pub fn try_clone ( & self ) -> io:: Result < UnixSeqpacketListener > {
1595
1595
self . 0 . duplicate ( ) . map ( UnixSeqpacketListener )
1596
1596
}
@@ -1607,7 +1607,7 @@ impl UnixSeqpacketListener {
1607
1607
///
1608
1608
/// let addr = listener.local_addr().expect("Couldn't get local address");
1609
1609
/// ```
1610
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1610
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1611
1611
pub fn local_addr ( & self ) -> io:: Result < SocketAddr > {
1612
1612
SocketAddr :: new ( |addr, len| unsafe { libc:: getsockname ( * self . 0 . as_inner ( ) , addr, len) } )
1613
1613
}
@@ -1624,7 +1624,7 @@ impl UnixSeqpacketListener {
1624
1624
///
1625
1625
/// listener.set_nonblocking(true).expect("Couldn't set non blocking");
1626
1626
/// ```
1627
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1627
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1628
1628
pub fn set_nonblocking ( & self , nonblocking : bool ) -> io:: Result < ( ) > {
1629
1629
self . 0 . set_nonblocking ( nonblocking)
1630
1630
}
@@ -1643,7 +1643,7 @@ impl UnixSeqpacketListener {
1643
1643
/// println!("Got error: {:?}", err);
1644
1644
/// }
1645
1645
/// ```
1646
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1646
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1647
1647
pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
1648
1648
self . 0 . take_error ( )
1649
1649
}
@@ -1680,34 +1680,34 @@ impl UnixSeqpacketListener {
1680
1680
/// }
1681
1681
/// }
1682
1682
/// ```
1683
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1683
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1684
1684
pub fn incoming < ' a > ( & ' a self ) -> IncomingSeqpacket < ' a > {
1685
1685
IncomingSeqpacket { listener : self }
1686
1686
}
1687
1687
}
1688
1688
1689
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1689
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1690
1690
impl AsRawFd for UnixSeqpacketListener {
1691
1691
fn as_raw_fd ( & self ) -> RawFd {
1692
1692
* self . 0 . as_inner ( )
1693
1693
}
1694
1694
}
1695
1695
1696
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1696
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1697
1697
impl FromRawFd for UnixSeqpacketListener {
1698
1698
unsafe fn from_raw_fd ( fd : RawFd ) -> UnixSeqpacketListener {
1699
1699
UnixSeqpacketListener ( Socket :: from_inner ( fd) )
1700
1700
}
1701
1701
}
1702
1702
1703
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1703
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1704
1704
impl IntoRawFd for UnixSeqpacketListener {
1705
1705
fn into_raw_fd ( self ) -> RawFd {
1706
1706
self . 0 . into_inner ( )
1707
1707
}
1708
1708
}
1709
1709
1710
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1710
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1711
1711
impl < ' a > IntoIterator for & ' a UnixSeqpacketListener {
1712
1712
type Item = io:: Result < UnixSeqpacket > ;
1713
1713
type IntoIter = IncomingSeqpacket < ' a > ;
@@ -1749,12 +1749,12 @@ impl<'a> IntoIterator for &'a UnixSeqpacketListener {
1749
1749
/// }
1750
1750
/// ```
1751
1751
#[ derive( Debug ) ]
1752
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1752
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1753
1753
pub struct IncomingSeqpacket < ' a > {
1754
1754
listener : & ' a UnixSeqpacketListener ,
1755
1755
}
1756
1756
1757
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1757
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1758
1758
impl < ' a > Iterator for IncomingSeqpacket < ' a > {
1759
1759
type Item = io:: Result < UnixSeqpacket > ;
1760
1760
@@ -1785,10 +1785,10 @@ impl<'a> Iterator for IncomingSeqpacket<'a> {
1785
1785
/// let count = socket.recv(&mut buf).unwrap();
1786
1786
/// println!("socket {:?} sent {:?}", path, &buf[..count]);
1787
1787
/// ```
1788
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1788
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1789
1789
pub struct UnixSeqpacket ( Socket ) ;
1790
1790
1791
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1791
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1792
1792
impl fmt:: Debug for UnixSeqpacket {
1793
1793
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1794
1794
let mut builder = fmt. debug_struct ( "UnixSeqpacket" ) ;
@@ -1820,7 +1820,7 @@ impl UnixSeqpacket {
1820
1820
/// }
1821
1821
/// };
1822
1822
/// ```
1823
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1823
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1824
1824
pub fn connect < P : AsRef < Path > > ( path : P ) -> io:: Result < UnixSeqpacket > {
1825
1825
fn inner ( path : & Path ) -> io:: Result < UnixSeqpacket > {
1826
1826
unsafe {
@@ -1852,7 +1852,7 @@ impl UnixSeqpacket {
1852
1852
/// }
1853
1853
/// };
1854
1854
/// ```
1855
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1855
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1856
1856
pub fn pair ( ) -> io:: Result < ( UnixSeqpacket , UnixSeqpacket ) > {
1857
1857
let ( i1, i2) = Socket :: new_pair ( libc:: AF_UNIX , libc:: SOCK_SEQPACKET ) ?;
1858
1858
Ok ( ( UnixSeqpacket ( i1) , UnixSeqpacket ( i2) ) )
@@ -1874,7 +1874,7 @@ impl UnixSeqpacket {
1874
1874
///
1875
1875
/// let sock_copy = socket.try_clone().expect("try_clone failed");
1876
1876
/// ```
1877
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1877
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1878
1878
pub fn try_clone ( & self ) -> io:: Result < UnixSeqpacket > {
1879
1879
self . 0 . duplicate ( ) . map ( UnixSeqpacket )
1880
1880
}
@@ -1891,7 +1891,7 @@ impl UnixSeqpacket {
1891
1891
///
1892
1892
/// let addr = socket.local_addr().expect("Couldn't get local address");
1893
1893
/// ```
1894
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1894
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1895
1895
pub fn local_addr ( & self ) -> io:: Result < SocketAddr > {
1896
1896
SocketAddr :: new ( |addr, len| unsafe { libc:: getsockname ( * self . 0 . as_inner ( ) , addr, len) } )
1897
1897
}
@@ -1908,7 +1908,7 @@ impl UnixSeqpacket {
1908
1908
///
1909
1909
/// let addr = socket.peer_addr().expect("Couldn't get peer address");
1910
1910
/// ```
1911
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1911
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1912
1912
pub fn peer_addr ( & self ) -> io:: Result < SocketAddr > {
1913
1913
SocketAddr :: new ( |addr, len| unsafe { libc:: getpeername ( * self . 0 . as_inner ( ) , addr, len) } )
1914
1914
}
@@ -1927,7 +1927,7 @@ impl UnixSeqpacket {
1927
1927
/// let mut buf = vec![0; 10];
1928
1928
/// socket.recv(buf.as_mut_slice()).expect("recv function failed");
1929
1929
/// ```
1930
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1930
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1931
1931
pub fn recv ( & self , buf : & mut [ u8 ] ) -> io:: Result < usize > {
1932
1932
self . 0 . read ( buf)
1933
1933
}
@@ -1945,7 +1945,7 @@ impl UnixSeqpacket {
1945
1945
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
1946
1946
/// socket.send(b"omelette au fromage").expect("send_to function failed");
1947
1947
/// ```
1948
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1948
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1949
1949
pub fn send ( & self , buf : & [ u8 ] ) -> io:: Result < usize > {
1950
1950
self . 0 . write ( buf)
1951
1951
}
@@ -1988,7 +1988,7 @@ impl UnixSeqpacket {
1988
1988
/// let err = result.unwrap_err();
1989
1989
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
1990
1990
/// ```
1991
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
1991
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
1992
1992
pub fn set_read_timeout ( & self , timeout : Option < Duration > ) -> io:: Result < ( ) > {
1993
1993
self . 0 . set_timeout ( timeout, libc:: SO_RCVTIMEO )
1994
1994
}
@@ -2030,7 +2030,7 @@ impl UnixSeqpacket {
2030
2030
/// let err = result.unwrap_err();
2031
2031
/// assert_eq!(err.kind(), io::ErrorKind::InvalidInput)
2032
2032
/// ```
2033
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2033
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2034
2034
pub fn set_write_timeout ( & self , timeout : Option < Duration > ) -> io:: Result < ( ) > {
2035
2035
self . 0 . set_timeout ( timeout, libc:: SO_SNDTIMEO )
2036
2036
}
@@ -2049,7 +2049,7 @@ impl UnixSeqpacket {
2049
2049
/// .expect("set_read_timeout function failed");
2050
2050
/// assert_eq!(socket.read_timeout().unwrap(), Some(Duration::new(1, 0)));
2051
2051
/// ```
2052
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2052
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2053
2053
pub fn read_timeout ( & self ) -> io:: Result < Option < Duration > > {
2054
2054
self . 0 . timeout ( libc:: SO_RCVTIMEO )
2055
2055
}
@@ -2068,7 +2068,7 @@ impl UnixSeqpacket {
2068
2068
/// .expect("set_write_timeout function failed");
2069
2069
/// assert_eq!(socket.write_timeout().unwrap(), Some(Duration::new(1, 0)));
2070
2070
/// ```
2071
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2071
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2072
2072
pub fn write_timeout ( & self ) -> io:: Result < Option < Duration > > {
2073
2073
self . 0 . timeout ( libc:: SO_SNDTIMEO )
2074
2074
}
@@ -2084,7 +2084,7 @@ impl UnixSeqpacket {
2084
2084
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
2085
2085
/// socket.set_nonblocking(true).expect("set_nonblocking function failed");
2086
2086
/// ```
2087
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2087
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2088
2088
pub fn set_nonblocking ( & self , nonblocking : bool ) -> io:: Result < ( ) > {
2089
2089
self . 0 . set_nonblocking ( nonblocking)
2090
2090
}
@@ -2102,7 +2102,7 @@ impl UnixSeqpacket {
2102
2102
/// println!("Got error: {:?}", err);
2103
2103
/// }
2104
2104
/// ```
2105
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2105
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2106
2106
pub fn take_error ( & self ) -> io:: Result < Option < io:: Error > > {
2107
2107
self . 0 . take_error ( )
2108
2108
}
@@ -2123,27 +2123,27 @@ impl UnixSeqpacket {
2123
2123
/// let socket = UnixSeqpacket::connect("/path/to/the/socket").unwrap();
2124
2124
/// socket.shutdown(Shutdown::Both).expect("shutdown function failed");
2125
2125
/// ```
2126
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2126
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2127
2127
pub fn shutdown ( & self , how : Shutdown ) -> io:: Result < ( ) > {
2128
2128
self . 0 . shutdown ( how)
2129
2129
}
2130
2130
}
2131
2131
2132
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2132
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2133
2133
impl AsRawFd for UnixSeqpacket {
2134
2134
fn as_raw_fd ( & self ) -> RawFd {
2135
2135
* self . 0 . as_inner ( )
2136
2136
}
2137
2137
}
2138
2138
2139
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2139
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2140
2140
impl FromRawFd for UnixSeqpacket {
2141
2141
unsafe fn from_raw_fd ( fd : RawFd ) -> UnixSeqpacket {
2142
2142
UnixSeqpacket ( Socket :: from_inner ( fd) )
2143
2143
}
2144
2144
}
2145
2145
2146
- #[ unstable( feature = "unix_socket " , issue = "0" ) ]
2146
+ #[ unstable( feature = "unix_socket_seqpacket " , issue = "0" ) ]
2147
2147
impl IntoRawFd for UnixSeqpacket {
2148
2148
fn into_raw_fd ( self ) -> RawFd {
2149
2149
self . 0 . into_inner ( )
0 commit comments