Chromium Code Reviews| Index: runtime/bin/socket_patch.dart |
| diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart |
| index 3b9aaae6882d2cd05a4c2718b03724b643815fa2..499bb4d54c6147225f2d97bcc87e1b2a0330198d 100644 |
| --- a/runtime/bin/socket_patch.dart |
| +++ b/runtime/bin/socket_patch.dart |
| @@ -733,7 +733,7 @@ class _Socket extends Stream<List<int>> implements Socket { |
| onSubscriptionStateChange: _onSubscriptionStateChange, |
| onPauseStateChange: _onPauseStateChange); |
| _consumer = new _SocketStreamConsumer(this); |
| - _sink = new IOSink(_consumer); |
| + _sink = new IOSink(_consumer, Encoding.ASCII); |
| // Disable read events until there is a subscription. |
| _raw.readEventsEnabled = false; |
| @@ -763,6 +763,16 @@ class _Socket extends Stream<List<int>> implements Socket { |
| unsubscribeOnError: unsubscribeOnError); |
| } |
| + Encoding get encoding => _sink.encoding; |
| + void set encoding(Encoding value) => _sink.encoding = value; |
| + |
| + void write(Object obj) => _sink.write(obj); |
| + void writeln(Object obj) => _sink.writeln(obj); |
| + void writeCharCode(int charCode) => _sink.writeCharCode(charCode); |
| + void writeAll(Iterable objects) => _sink.writeAll(objects); |
| + |
|
Mads Ager (google)
2013/03/07 07:57:36
Nit: remove the empty line or consistently have on
Søren Gjesse
2013/03/07 16:28:47
Done.
|
| + void writeBytes(List<int> bytes) => _sink.writeBytes(bytes); |
| + |
| Future<Socket> consume(Stream<List<int>> stream) { |
| return _sink.consume(stream); |
| } |