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 _HttpHeaders implements HttpHeaders { | 5 class _HttpHeaders implements HttpHeaders { |
6 _HttpHeaders() : _headers = new Map<String, List<String>>(); | 6 _HttpHeaders() : _headers = new Map<String, List<String>>(); |
7 | 7 |
8 List<String> operator[](String name) { | 8 List<String> operator[](String name) { |
9 name = name.toLowerCase(); | 9 name = name.toLowerCase(); |
10 return _headers[name]; | 10 return _headers[name]; |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 _HttpOutputStream(_HttpRequestResponseBase this._requestOrResponse); | 573 _HttpOutputStream(_HttpRequestResponseBase this._requestOrResponse); |
574 | 574 |
575 bool write(List<int> buffer, [bool copyBuffer = true]) { | 575 bool write(List<int> buffer, [bool copyBuffer = true]) { |
576 return _requestOrResponse._streamWrite(buffer, copyBuffer); | 576 return _requestOrResponse._streamWrite(buffer, copyBuffer); |
577 } | 577 } |
578 | 578 |
579 bool writeFrom(List<int> buffer, [int offset = 0, int len]) { | 579 bool writeFrom(List<int> buffer, [int offset = 0, int len]) { |
580 return _requestOrResponse._streamWriteFrom(buffer, offset, len); | 580 return _requestOrResponse._streamWriteFrom(buffer, offset, len); |
581 } | 581 } |
582 | 582 |
| 583 void flush() { |
| 584 // Nothing to do on a HTTP output stream. |
| 585 } |
| 586 |
583 void close() { | 587 void close() { |
584 _requestOrResponse._streamClose(); | 588 _requestOrResponse._streamClose(); |
585 } | 589 } |
586 | 590 |
587 void destroy() { | 591 void destroy() { |
588 throw "Not implemented"; | 592 throw "Not implemented"; |
589 } | 593 } |
590 | 594 |
591 void set onNoPendingWrites(void callback()) { | 595 void set onNoPendingWrites(void callback()) { |
592 _requestOrResponse._streamSetNoPendingWriteHandler(callback); | 596 _requestOrResponse._streamSetNoPendingWriteHandler(callback); |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 sockets.addFirst(socketConn); | 1334 sockets.addFirst(socketConn); |
1331 socketConn._markReturned(); | 1335 socketConn._markReturned(); |
1332 } | 1336 } |
1333 | 1337 |
1334 Function _onOpen; | 1338 Function _onOpen; |
1335 Map<String, Queue<_SocketConnection>> _openSockets; | 1339 Map<String, Queue<_SocketConnection>> _openSockets; |
1336 Set<_SocketConnection> _activeSockets; | 1340 Set<_SocketConnection> _activeSockets; |
1337 Timer _evictionTimer; | 1341 Timer _evictionTimer; |
1338 bool _shutdown; // Has this HTTP client been shutdown? | 1342 bool _shutdown; // Has this HTTP client been shutdown? |
1339 } | 1343 } |
OLD | NEW |