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

Issue 10803033: Add the ability to get info of a Http connection, e.g. host and port. (Closed)

Created:
8 years, 5 months ago by Anders Johnsen
Modified:
8 years, 5 months ago
Reviewers:
ricow1, Bill Hesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add the ability to get info of a Http connection, e.g. host and port. BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9761

Patch Set 1 #

Total comments: 5

Patch Set 2 : Add test and fix a few issues. #

Patch Set 3 : Simplify wrapper function and fix a type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -0 lines) Patch
M runtime/bin/http.dart View 1 4 chunks +27 lines, -0 lines 0 comments Download
M runtime/bin/http_impl.dart View 1 2 3 chunks +21 lines, -0 lines 0 comments Download
A tests/standalone/io/http_connection_info_test.dart View 1 1 chunk +46 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Anders Johnsen
8 years, 5 months ago (2012-07-19 14:29:07 UTC) #1
ricow1
https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http.dart File runtime/bin/http.dart (right): https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http.dart#newcode876 runtime/bin/http.dart:876: String get localPort(); int?
8 years, 5 months ago (2012-07-19 14:32:28 UTC) #2
Anders Johnsen
I think I have some old tests for this, let me add them. https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http.dart File ...
8 years, 5 months ago (2012-07-19 14:33:36 UTC) #3
Anders Johnsen
PTAL
8 years, 5 months ago (2012-07-19 14:47:53 UTC) #4
Bill Hesse
LGTM. https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http_impl.dart File runtime/bin/http_impl.dart (right): https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http_impl.dart#newcode710 runtime/bin/http_impl.dart:710: HttpConnectionInfo get connectionInfo() { Why not => notation ...
8 years, 5 months ago (2012-07-19 15:05:10 UTC) #5
Anders Johnsen
8 years, 5 months ago (2012-07-19 15:12:44 UTC) #6
https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http_impl....
File runtime/bin/http_impl.dart (right):

https://chromiumcodereview.appspot.com/10803033/diff/1/runtime/bin/http_impl....
runtime/bin/http_impl.dart:1252: info.remoteHost = _socket.remoteHost;
On 2012/07/19 15:05:10, Bill Hesse wrote:
> Why not have a constructor
> _HttpConnectionInfo(this.remoteHost, this.remotePort, this.localPort);
> ?  It makes me think something weird is going on when I see this weird
> assignment to fields after construction.

_HttpConnectionInfo is a simple data container. Using a constructor will be
quite annoying when expanding with more properties and we would loose the nice
property of having explicit named assignments.

Powered by Google App Engine
This is Rietveld 408576698