Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: sdk/lib/io/secure_socket.dart

Issue 11453006: Fix a number of HTTP issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 /** 5 /**
6 * SecureSocket provides a secure (SSL or TLS) client connection to a server. 6 * SecureSocket provides a secure (SSL or TLS) client connection to a server.
7 * The certificate provided by the server is checked 7 * The certificate provided by the server is checked
8 * using the certificate database provided in setCertificateDatabase. 8 * using the certificate database provided in setCertificateDatabase.
9 */ 9 */
10 abstract class SecureSocket implements Socket { 10 abstract class SecureSocket implements Socket {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 "Cannot set connect handler when already connected"); 123 "Cannot set connect handler when already connected");
124 } 124 }
125 _onConnect = callback; 125 _onConnect = callback;
126 } 126 }
127 127
128 void set _onConnect(void callback()) { 128 void set _onConnect(void callback()) {
129 _socketConnectHandler = callback; 129 _socketConnectHandler = callback;
130 } 130 }
131 131
132 void set onData(void callback()) { 132 void set onData(void callback()) {
133 if (_outputStream != null && callback != null) { 133 if (_inputStream != null && callback != null) {
Mads Ager (google) 2012/12/05 16:02:18 Heh! Thanks!
134 throw new StreamException( 134 throw new StreamException(
135 "Cannot set data handler when input stream is used"); 135 "Cannot set data handler when input stream is used");
136 } 136 }
137 _onData = callback; 137 _onData = callback;
138 } 138 }
139 139
140 void set _onData(void callback()) { 140 void set _onData(void callback()) {
141 _socketDataHandler = callback; 141 _socketDataHandler = callback;
142 } 142 }
143 143
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 bool is_server, 581 bool is_server,
582 String certificateName); 582 String certificateName);
583 void destroy(); 583 void destroy();
584 void handshake(); 584 void handshake();
585 void init(); 585 void init();
586 int processBuffer(int bufferIndex); 586 int processBuffer(int bufferIndex);
587 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler); 587 void registerHandshakeCompleteCallback(Function handshakeCompleteHandler);
588 588
589 List<_ExternalBuffer> get buffers; 589 List<_ExternalBuffer> get buffers;
590 } 590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698