Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Side by Side Diff: sdk/lib/io/secure_server_socket.dart

Issue 304513004: Add 'owner' field to sockets, that point to a potential IO resource using that Socket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * The [SecureServerSocket] is a server socket, providing a stream of high-level 8 * The [SecureServerSocket] is a server socket, providing a stream of high-level
9 * [Socket]s. 9 * [Socket]s.
10 * 10 *
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 /** 97 /**
98 * Returns the address used by this socket. 98 * Returns the address used by this socket.
99 */ 99 */
100 InternetAddress get address => _socket.address; 100 InternetAddress get address => _socket.address;
101 101
102 /** 102 /**
103 * Closes the socket. The returned future completes when the socket 103 * Closes the socket. The returned future completes when the socket
104 * is fully closed and is no longer bound. 104 * is fully closed and is no longer bound.
105 */ 105 */
106 Future<SecureServerSocket> close() => _socket.close().then((_) => this); 106 Future<SecureServerSocket> close() => _socket.close().then((_) => this);
107
108 void set _owner(owner) { _socket._owner = owner; }
107 } 109 }
108 110
109 111
110 /** 112 /**
111 * The RawSecureServerSocket is a server socket, providing a stream of low-level 113 * The RawSecureServerSocket is a server socket, providing a stream of low-level
112 * [RawSecureSocket]s. 114 * [RawSecureSocket]s.
113 * 115 *
114 * See [RawSecureSocket] for more info. 116 * See [RawSecureSocket] for more info.
115 */ 117 */
116 class RawSecureServerSocket extends Stream<RawSecureSocket> { 118 class RawSecureServerSocket extends Stream<RawSecureSocket> {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 273
272 void _onSubscriptionStateChange() { 274 void _onSubscriptionStateChange() {
273 if (_controller.hasListener) { 275 if (_controller.hasListener) {
274 _subscription = _socket.listen(_onData, 276 _subscription = _socket.listen(_onData,
275 onDone: _onDone, 277 onDone: _onDone,
276 onError: _onError); 278 onError: _onError);
277 } else { 279 } else {
278 close(); 280 close();
279 } 281 }
280 } 282 }
283
284 void set _owner(owner) { (_socket as dynamic)._owner = owner; }
281 } 285 }
282 286
283 287
OLDNEW
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/websocket_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698