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

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

Issue 14640008: Change the signature for all network bind calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments by whesse@ Created 7 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.dart ('k') | sdk/lib/io/secure_server_socket.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 class _HttpIncoming extends Stream<List<int>> { 7 class _HttpIncoming extends Stream<List<int>> {
8 final int _transferLength; 8 final int _transferLength;
9 final Completer _dataCompleter = new Completer(); 9 final Completer _dataCompleter = new Completer();
10 Stream<List<int>> _stream; 10 Stream<List<int>> _stream;
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 bool get _isActive => _state == _ACTIVE; 1627 bool get _isActive => _state == _ACTIVE;
1628 bool get _isIdle => _state == _IDLE; 1628 bool get _isIdle => _state == _IDLE;
1629 bool get _isClosing => _state == _CLOSING; 1629 bool get _isClosing => _state == _CLOSING;
1630 bool get _isDetached => _state == _DETACHED; 1630 bool get _isDetached => _state == _DETACHED;
1631 } 1631 }
1632 1632
1633 1633
1634 // HTTP server waiting for socket connections. 1634 // HTTP server waiting for socket connections.
1635 class _HttpServer extends Stream<HttpRequest> implements HttpServer { 1635 class _HttpServer extends Stream<HttpRequest> implements HttpServer {
1636 1636
1637 static Future<HttpServer> bind(String host, int port, int backlog) { 1637 static Future<HttpServer> bind(address, int port, int backlog) {
1638 return ServerSocket.bind(host, port, backlog).then((socket) { 1638 return ServerSocket.bind(address, port, backlog: backlog).then((socket) {
1639 return new _HttpServer._(socket, true); 1639 return new _HttpServer._(socket, true);
1640 }); 1640 });
1641 } 1641 }
1642 1642
1643 static Future<HttpServer> bindSecure(String host, 1643 static Future<HttpServer> bindSecure(address,
1644 int port, 1644 int port,
1645 int backlog, 1645 int backlog,
1646 String certificate_name, 1646 String certificate_name,
1647 bool requestClientCertificate) { 1647 bool requestClientCertificate) {
1648 return SecureServerSocket.bind( 1648 return SecureServerSocket.bind(
1649 host, 1649 address,
1650 port, 1650 port,
1651 backlog,
1652 certificate_name, 1651 certificate_name,
1652 backlog: backlog,
1653 requestClientCertificate: requestClientCertificate) 1653 requestClientCertificate: requestClientCertificate)
1654 .then((socket) { 1654 .then((socket) {
1655 return new _HttpServer._(socket, true); 1655 return new _HttpServer._(socket, true);
1656 }); 1656 });
1657 } 1657 }
1658 1658
1659 _HttpServer._(this._serverSocket, this._closeServer); 1659 _HttpServer._(this._serverSocket, this._closeServer);
1660 1660
1661 _HttpServer.listenOn(ServerSocket this._serverSocket) 1661 _HttpServer.listenOn(ServerSocket this._serverSocket)
1662 : _closeServer = false; 1662 : _closeServer = false;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 2058
2059 2059
2060 class _RedirectInfo implements RedirectInfo { 2060 class _RedirectInfo implements RedirectInfo {
2061 const _RedirectInfo(int this.statusCode, 2061 const _RedirectInfo(int this.statusCode,
2062 String this.method, 2062 String this.method,
2063 Uri this.location); 2063 Uri this.location);
2064 final int statusCode; 2064 final int statusCode;
2065 final String method; 2065 final String method;
2066 final Uri location; 2066 final Uri location;
2067 } 2067 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/secure_server_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698