| 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 patch class SecureSocket { | 5 patch class SecureSocket { |
| 6 /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) => | 6 /* patch */ factory SecureSocket._(RawSecureSocket rawSocket) => |
| 7 new _SecureSocket(rawSocket); | 7 new _SecureSocket(rawSocket); |
| 8 | 8 |
| 9 /* patch */ static void initialize({String database, | 9 /* patch */ static void initialize({String database, |
| 10 String password, | 10 String password, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 extends NativeFieldWrapperClass1 | 50 extends NativeFieldWrapperClass1 |
| 51 implements _SecureFilter { | 51 implements _SecureFilter { |
| 52 _SecureFilterImpl() { | 52 _SecureFilterImpl() { |
| 53 buffers = new List<_ExternalBuffer>(_RawSecureSocket.NUM_BUFFERS); | 53 buffers = new List<_ExternalBuffer>(_RawSecureSocket.NUM_BUFFERS); |
| 54 for (int i = 0; i < _RawSecureSocket.NUM_BUFFERS; ++i) { | 54 for (int i = 0; i < _RawSecureSocket.NUM_BUFFERS; ++i) { |
| 55 buffers[i] = new _ExternalBuffer(); | 55 buffers[i] = new _ExternalBuffer(); |
| 56 } | 56 } |
| 57 } | 57 } |
| 58 | 58 |
| 59 void connect(String hostName, | 59 void connect(String hostName, |
| 60 Uint8List sockaddrStorage, |
| 60 int port, | 61 int port, |
| 61 bool is_server, | 62 bool is_server, |
| 62 String certificateName, | 63 String certificateName, |
| 63 bool requestClientCertificate, | 64 bool requestClientCertificate, |
| 64 bool requireClientCertificate, | 65 bool requireClientCertificate, |
| 65 bool sendClientCertificate) native "SecureSocket_Connect"; | 66 bool sendClientCertificate) native "SecureSocket_Connect"; |
| 66 | 67 |
| 67 void destroy() { | 68 void destroy() { |
| 68 buffers = null; | 69 buffers = null; |
| 69 _destroy(); | 70 _destroy(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 80 int processBuffer(int bufferIndex) native "SecureSocket_ProcessBuffer"; | 81 int processBuffer(int bufferIndex) native "SecureSocket_ProcessBuffer"; |
| 81 | 82 |
| 82 void registerBadCertificateCallback(Function callback) | 83 void registerBadCertificateCallback(Function callback) |
| 83 native "SecureSocket_RegisterBadCertificateCallback"; | 84 native "SecureSocket_RegisterBadCertificateCallback"; |
| 84 | 85 |
| 85 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) | 86 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler) |
| 86 native "SecureSocket_RegisterHandshakeCompleteCallback"; | 87 native "SecureSocket_RegisterHandshakeCompleteCallback"; |
| 87 | 88 |
| 88 List<_ExternalBuffer> buffers; | 89 List<_ExternalBuffer> buffers; |
| 89 } | 90 } |
| OLD | NEW |