OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 patch class RawServerSocket { | 5 patch class RawServerSocket { |
6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1", | 6 /* patch */ static Future<RawServerSocket> bind([String address = "127.0.0.1", |
7 int port = 0, | 7 int port = 0, |
8 int backlog = 0]) { | 8 int backlog = 0]) { |
9 return _RawServerSocket.bind(address, port, backlog); | 9 return _RawServerSocket.bind(address, port, backlog); |
10 } | 10 } |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 } | 808 } |
809 | 809 |
810 void write(Object obj) => _sink.write(obj); | 810 void write(Object obj) => _sink.write(obj); |
811 | 811 |
812 void writeln([Object obj = ""]) => _sink.writeln(obj); | 812 void writeln([Object obj = ""]) => _sink.writeln(obj); |
813 | 813 |
814 void writeCharCode(int charCode) => _sink.writeCharCode(charCode); | 814 void writeCharCode(int charCode) => _sink.writeCharCode(charCode); |
815 | 815 |
816 void writeAll(Iterable objects, [sep = ""]) => _sink.writeAll(objects, sep); | 816 void writeAll(Iterable objects, [sep = ""]) => _sink.writeAll(objects, sep); |
817 | 817 |
818 void writeBytes(List<int> bytes) => _sink.writeBytes(bytes); | 818 void add(List<int> bytes) => _sink.add(bytes); |
819 | 819 |
820 Future<Socket> consume(Stream<List<int>> stream) { | 820 Future<Socket> consume(Stream<List<int>> stream) { |
821 return _sink.consume(stream); | 821 return _sink.consume(stream); |
822 } | 822 } |
823 | 823 |
824 Future<Socket> writeStream(Stream<List<int>> stream) { | 824 Future<Socket> writeStream(Stream<List<int>> stream) { |
825 return _sink.writeStream(stream); | 825 return _sink.writeStream(stream); |
826 } | 826 } |
827 | 827 |
828 close() => _sink.close(); | 828 close() => _sink.close(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
973 _raw.onBadCertificate = callback; | 973 _raw.onBadCertificate = callback; |
974 } | 974 } |
975 | 975 |
976 X509Certificate get peerCertificate { | 976 X509Certificate get peerCertificate { |
977 if (_raw == null) { | 977 if (_raw == null) { |
978 throw new StateError("peerCertificate called on destroyed SecureSocket"); | 978 throw new StateError("peerCertificate called on destroyed SecureSocket"); |
979 } | 979 } |
980 return _raw.peerCertificate; | 980 return _raw.peerCertificate; |
981 } | 981 } |
982 } | 982 } |
OLD | NEW |