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

Unified Diff: runtime/bin/http.dart

Issue 9500002: Rename blahHandler to onBlah throughout dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 10 months 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/file_impl.dart ('k') | runtime/bin/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http.dart
diff --git a/runtime/bin/http.dart b/runtime/bin/http.dart
index d8d2c73511edf506d2dd7bca7d47a3a9083c4d49..40bbc7a3c5cb75ee0e194a0ba21c9940de19677a 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -60,11 +60,11 @@ interface HttpServer default _HttpServer {
/**
* Start listening for HTTP requests on the specified [host] and
- * [port]. For each HTTP request the handler set through
- * [requestHandler] will be invoked. If a [port] of 0 is specified
- * the server will choose an ephemeral port. The optional argument
- * [backlog] can be used to specify the listen backlog for the
- * underlying OS listen setup.
+ * [port]. For each HTTP request the handler set through [onRequest]
+ * will be invoked. If a [port] of 0 is specified the server will
+ * choose an ephemeral port. The optional argument [backlog] can be
+ * used to specify the listen backlog for the underlying OS listen
+ * setup.
*/
void listen(String host, int port, [int backlog]);
@@ -83,12 +83,12 @@ interface HttpServer default _HttpServer {
/**
* Sets the handler that gets called when a new HTTP request is received.
*/
- void set requestHandler(void handler(HttpRequest, HttpResponse));
+ void set onRequest(void handler(HttpRequest, HttpResponse));
/**
* Sets the error handler that is called when a connection error occurs.
*/
- void set errorHandler(void handler(String errorMessage));
+ void set onError(void handler(String errorMessage));
}
@@ -239,16 +239,16 @@ interface HttpClient default _HttpClient {
* that initiate a connection to an HTTP server. The handlers will be
* called as the connection state progresses.
*
- * The setting of all handlers is optional. If the [requestHandler] is
- * not set the request will be send without any additional headers and
- * an empty body. If the [responseHandler] is not set the response
- * will be read and discarded.
+ * The setting of all handlers is optional. If [onRequest] is not set
+ * the request will be send without any additional headers and an
+ * empty body. If [onResponse] is not set the response will be read
+ * and discarded.
*/
interface HttpClientConnection {
/**
* Sets the handler that is called when the connection is established.
*/
- void set requestHandler(void handler(HttpClientRequest request));
+ void set onRequest(void handler(HttpClientRequest request));
/**
* Sets callback to be called when the request has been send and
@@ -256,13 +256,13 @@ interface HttpClientConnection {
* all headers of the response are received and data is ready to be
* received.
*/
- void set responseHandler(void handler(HttpClientResponse response));
+ void set onResponse(void handler(HttpClientResponse response));
/**
* Sets the handler that gets called if an error occurs while
* processing the HTTP request.
*/
- void set errorHandler(void handler(HttpException e));
+ void set onError(void handler(HttpException e));
}
« no previous file with comments | « runtime/bin/file_impl.dart ('k') | runtime/bin/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698