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

Unified Diff: samples/chat/http.dart

Issue 8776001: Fix HTTP sample implementation to actually wait for connections before attempting to write. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/socket_impl.dart ('k') | samples/chat/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/http.dart
diff --git a/samples/chat/http.dart b/samples/chat/http.dart
index 9f1c6f952c1445e765a0e7b76d638c1cf4410c7b..19118a9810a63b20ad764c984b498b89e9bc8a4a 100644
--- a/samples/chat/http.dart
+++ b/samples/chat/http.dart
@@ -203,14 +203,21 @@ interface HTTPClient factory HTTPClientImplementation {
HTTPClient();
/**
- * Open a HTTP connection.
+ * Open a HTTP connection. The [openHandler] is called with an
+ * HTTPClientRequest when the connection has been successfully
+ * opened.
*/
- HTTPClientRequest open(String method, String host, int port, String path);
+ void open(String method, String host, int port, String path);
/**
* Shutdown the HTTP client releasing all resources.
*/
void shutdown();
+
+ /**
+ * Set the open handler that is called on successful open operations.
+ */
+ void set openHandler(void handler(HTTPClientRequest request));
}
« no previous file with comments | « runtime/bin/socket_impl.dart ('k') | samples/chat/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698