| Index: runtime/bin/http_impl.dart
|
| diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
|
| index ef590d78287710c3954d4b63c05ce7799676cc8f..c664c512ca6bce3de537be4395153ad939e7dd1a 100644
|
| --- a/runtime/bin/http_impl.dart
|
| +++ b/runtime/bin/http_impl.dart
|
| @@ -707,6 +707,8 @@ class _HttpRequestResponseBase {
|
| _bodyBytesWritten += bytes;
|
| }
|
|
|
| + HttpConnectionInfo get connectionInfo() => _httpConnection.connectionInfo;
|
| +
|
| int _state;
|
| bool _headResponse;
|
|
|
| @@ -1241,6 +1243,18 @@ class _HttpConnectionBase implements Hashable {
|
| return new _DetachedSocket(socket, _httpParser.unparsedData);
|
| }
|
|
|
| + HttpConnectionInfo get connectionInfo() {
|
| + if (_socket == null || _closing || _error) return null;
|
| + try {
|
| + _HttpConnectionInfo info = new _HttpConnectionInfo();
|
| + info.remoteHost = _socket.remoteHost;
|
| + info.remotePort = _socket.remotePort;
|
| + info.localPort = _socket.port;
|
| + return info;
|
| + } catch (var e) { }
|
| + return null;
|
| + }
|
| +
|
| abstract void _onConnectionClosed(e);
|
| abstract void _responseDone();
|
|
|
| @@ -2100,6 +2114,13 @@ class _HttpClient implements HttpClient {
|
| }
|
|
|
|
|
| +class _HttpConnectionInfo implements HttpConnectionInfo {
|
| + String remoteHost;
|
| + int remotePort;
|
| + int localPort;
|
| +}
|
| +
|
| +
|
| class _DetachedSocket implements DetachedSocket {
|
| _DetachedSocket(this._socket, this._unparsedData);
|
| Socket get socket() => _socket;
|
|
|