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

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

Issue 25010004: Add .address to [Raw]ServerSocket and HttpServer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove 'host' arg from BarbackServer constructor. Created 7 years, 2 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/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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 } 2005 }
2006 _connections.clear(); 2006 _connections.clear();
2007 return result; 2007 return result;
2008 } 2008 }
2009 2009
2010 int get port { 2010 int get port {
2011 if (closed) throw new HttpException("HttpServer is not bound to a socket"); 2011 if (closed) throw new HttpException("HttpServer is not bound to a socket");
2012 return _serverSocket.port; 2012 return _serverSocket.port;
2013 } 2013 }
2014 2014
2015 InternetAddress get address {
2016 if (closed) throw new HttpException("HttpServer is not bound to a socket");
2017 return _serverSocket.address;
2018 }
2019
2015 set sessionTimeout(int timeout) { 2020 set sessionTimeout(int timeout) {
2016 _sessionManager.sessionTimeout = timeout; 2021 _sessionManager.sessionTimeout = timeout;
2017 } 2022 }
2018 2023
2019 void _handleRequest(HttpRequest request) { 2024 void _handleRequest(HttpRequest request) {
2020 _controller.add(request); 2025 _controller.add(request);
2021 } 2026 }
2022 2027
2023 void _handleError(error) { 2028 void _handleError(error) {
2024 if (!closed) _controller.addError(error); 2029 if (!closed) _controller.addError(error);
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 final Uri location; 2475 final Uri location;
2471 } 2476 }
2472 2477
2473 String _getHttpVersion() { 2478 String _getHttpVersion() {
2474 var version = Platform.version; 2479 var version = Platform.version;
2475 // Only include major and minor version numbers. 2480 // Only include major and minor version numbers.
2476 int index = version.indexOf('.', version.indexOf('.') + 1); 2481 int index = version.indexOf('.', version.indexOf('.') + 1);
2477 version = version.substring(0, index); 2482 version = version.substring(0, index);
2478 return 'Dart/$version (dart:io)'; 2483 return 'Dart/$version (dart:io)';
2479 } 2484 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698