File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
branches/try/src/libstd/io/net Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 2d27bfaeb6522d386d0a2735cb3f75cc5707314a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
5
- refs/heads/try: 8adfd02368343636fe83b68e35c3b8e2db0f0e02
5
+ refs/heads/try: d6dc01e7974bc6dc77b50563bd690c839eb66656
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ impl UdpSocket {
100
100
///
101
101
/// Note that this call does not perform any actual network communication,
102
102
/// because UDP is a datagram protocol.
103
+ #[ deprecated = "`UdpStream` has been deprecated" ]
104
+ #[ allow( deprecated) ]
103
105
pub fn connect ( self , other : SocketAddr ) -> UdpStream {
104
106
UdpStream {
105
107
socket : self ,
@@ -205,6 +207,14 @@ impl Clone for UdpSocket {
205
207
206
208
/// A type that allows convenient usage of a UDP stream connected to one
207
209
/// address via the `Reader` and `Writer` traits.
210
+ ///
211
+ /// # Note
212
+ ///
213
+ /// This structure has been deprecated because `Reader` is a stream-oriented API but UDP
214
+ /// is a packet-oriented protocol. Every `Reader` method will read a whole packet and
215
+ /// throw all superfluous bytes away so that they are no longer available for further
216
+ /// method calls.
217
+ #[ deprecated]
208
218
pub struct UdpStream {
209
219
socket : UdpSocket ,
210
220
connected_to : SocketAddr
@@ -336,6 +346,7 @@ mod test {
336
346
}
337
347
338
348
#[ test]
349
+ #[ allow( deprecated) ]
339
350
fn stream_smoke_test_ip4 ( ) {
340
351
let server_ip = next_test_ip4 ( ) ;
341
352
let client_ip = next_test_ip4 ( ) ;
@@ -380,6 +391,7 @@ mod test {
380
391
}
381
392
382
393
#[ test]
394
+ #[ allow( deprecated) ]
383
395
fn stream_smoke_test_ip6 ( ) {
384
396
let server_ip = next_test_ip6 ( ) ;
385
397
let client_ip = next_test_ip6 ( ) ;
You can’t perform that action at this time.
0 commit comments