| OLD | NEW |
| 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 class _HttpRequestResponseBase { | 5 class _HttpRequestResponseBase { |
| 6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection) | 6 _HttpRequestResponseBase(_HttpConnectionBase this._httpConnection) |
| 7 : _contentLength = -1, | 7 : _contentLength = -1, |
| 8 _keepAlive = false, | 8 _keepAlive = false, |
| 9 _headers = new Map(); | 9 _headers = new Map(); |
| 10 | 10 |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 if (_request != null) { | 625 if (_request != null) { |
| 626 _request._onDataEnd(); | 626 _request._onDataEnd(); |
| 627 } | 627 } |
| 628 _request = null; | 628 _request = null; |
| 629 } | 629 } |
| 630 | 630 |
| 631 void _responseDone() { | 631 void _responseDone() { |
| 632 // If the connection is closing then close the output stream to | 632 // If the connection is closing then close the output stream to |
| 633 // fully close the socket. | 633 // fully close the socket. |
| 634 if (_closing) { | 634 if (_closing) { |
| 635 outputStream.close(); | 635 _socket.close(); |
| 636 } | 636 } |
| 637 _response = null; | 637 _response = null; |
| 638 } | 638 } |
| 639 | 639 |
| 640 HttpServer _server; | 640 HttpServer _server; |
| 641 HttpRequest _request; | 641 HttpRequest _request; |
| 642 HttpResponse _response; | 642 HttpResponse _response; |
| 643 | 643 |
| 644 // Callbacks. | 644 // Callbacks. |
| 645 Function onRequestReceived; | 645 Function onRequestReceived; |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 sockets.addFirst(socketConn); | 1246 sockets.addFirst(socketConn); |
| 1247 socketConn._markReturned(); | 1247 socketConn._markReturned(); |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 Function _onOpen; | 1250 Function _onOpen; |
| 1251 Map<String, Queue<_SocketConnection>> _openSockets; | 1251 Map<String, Queue<_SocketConnection>> _openSockets; |
| 1252 Set<_SocketConnection> _activeSockets; | 1252 Set<_SocketConnection> _activeSockets; |
| 1253 Timer _evictionTimer; | 1253 Timer _evictionTimer; |
| 1254 bool _shutdown; // Has this HTTP client been shutdown? | 1254 bool _shutdown; // Has this HTTP client been shutdown? |
| 1255 } | 1255 } |
| OLD | NEW |