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

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

Issue 46663003: Fix sdk/lib/io errors found by the analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More fixes. Created 7 years, 1 month 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/io_sink.dart ('k') | sdk/lib/io/stdio.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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 onDone: onDone, 203 onDone: onDone,
204 cancelOnError: cancelOnError); 204 cancelOnError: cancelOnError);
205 } 205 }
206 206
207 /** 207 /**
208 * Returns the port used by this socket. 208 * Returns the port used by this socket.
209 */ 209 */
210 int get port => _socket.port; 210 int get port => _socket.port;
211 211
212 /** 212 /**
213 * Returns the address used by this socket.
214 */
215 InternetAddress get address => _socket.address;
216
217 /**
213 * Closes the socket. The returned future completes when the socket 218 * Closes the socket. The returned future completes when the socket
214 * is fully closed and is no longer bound. 219 * is fully closed and is no longer bound.
215 */ 220 */
216 Future<RawSecureServerSocket> close() { 221 Future<RawSecureServerSocket> close() {
217 _closed = true; 222 _closed = true;
218 return _socket.close().then((_) => this); 223 return _socket.close().then((_) => this);
219 } 224 }
220 225
221 void _onData(RawSocket connection) { 226 void _onData(RawSocket connection) {
222 var remotePort; 227 var remotePort;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 _subscription = _socket.listen(_onData, 274 _subscription = _socket.listen(_onData,
270 onDone: _onDone, 275 onDone: _onDone,
271 onError: _onError); 276 onError: _onError);
272 } else { 277 } else {
273 close(); 278 close();
274 } 279 }
275 } 280 }
276 } 281 }
277 282
278 283
OLDNEW
« no previous file with comments | « sdk/lib/io/io_sink.dart ('k') | sdk/lib/io/stdio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698