@@ -1253,9 +1253,9 @@ following interface:
1253
1253
1254
1254
impl TcpStream {
1255
1255
fn connect <A : ToSocketAddrs >(addr : & A ) -> io :: Result <TcpStream >;
1256
- fn peer_addr (& mut self ) -> io :: Result <SocketAddr >;
1257
- fn socket_addr (& mut self ) -> io :: Result <SocketAddr >;
1258
- fn shutdown (& mut self , how : Shutdown ) -> io :: Result <()>;
1256
+ fn peer_addr (& self ) -> io :: Result <SocketAddr >;
1257
+ fn socket_addr (& self ) -> io :: Result <SocketAddr >;
1258
+ fn shutdown (& self , how : Shutdown ) -> io :: Result <()>;
1259
1259
fn duplicate (& self ) -> io :: Result <TcpStream >;
1260
1260
}
1261
1261
@@ -1284,15 +1284,16 @@ impl<'a> Write for &'a TcpStream { ... }
1284
1284
write from a ` TcpStream `
1285
1285
1286
1286
Various other options such as ` nodelay ` and ` keepalive ` will be left
1287
- ` #[unstable] ` for now.
1287
+ ` #[unstable] ` for now. The ` TcpStream ` structure will also adhere to both ` Send `
1288
+ and ` Sync ` .
1288
1289
1289
1290
The ` TcpAcceptor ` struct will be removed and all functionality will be folded
1290
1291
into the ` TcpListener ` structure. Specifically, this will be the resulting API:
1291
1292
1292
1293
``` rust
1293
1294
impl TcpListener {
1294
1295
fn bind <A : ToSocketAddrs >(addr : & A ) -> io :: Result <TcpListener >;
1295
- fn socket_addr (& mut self ) -> io :: Result <SocketAddr >;
1296
+ fn socket_addr (& self ) -> io :: Result <SocketAddr >;
1296
1297
fn duplicate (& self ) -> io :: Result <TcpListener >;
1297
1298
fn accept (& self ) -> io :: Result <(TcpStream , SocketAddr )>;
1298
1299
fn incoming (& self ) -> Incoming ;
@@ -1323,11 +1324,13 @@ Some major changes from today's API include:
1323
1324
happen concurrently.
1324
1325
* For convenience the iterator does not yield the ` SocketAddr ` from ` accept ` .
1325
1326
1327
+ The ` TcpListener ` type will also adhere to ` Send ` and ` Sync ` .
1328
+
1326
1329
#### UDP
1327
1330
[ UDP ] : #udp
1328
1331
1329
- The UDP infrastructre will receive a similar face-lift as the TCP infrastructure
1330
- will:
1332
+ The UDP infrastructure will receive a similar face-lift as the TCP
1333
+ infrastructure will:
1331
1334
1332
1335
``` rust
1333
1336
impl UdpSocket {
@@ -1352,6 +1355,8 @@ Some important points of note are:
1352
1355
(as with TCP streams) or with a more general implementation of ` select ` .
1353
1356
* ` clone ` functionality has been replaced with ` duplicate ` .
1354
1357
1358
+ The ` UdpSocket ` type will adhere to both ` Send ` and ` Sync ` .
1359
+
1355
1360
#### Sockets
1356
1361
[ Sockets ] : #sockets
1357
1362
0 commit comments