Chromium Code Reviews| Index: runtime/bin/socket.dart |
| diff --git a/runtime/bin/socket.dart b/runtime/bin/socket.dart |
| index b807c9691455657fadf5fe0180bbda9ada9e3ddd..29e8df27181c5eff3c742d48edb76db88ba03e3c 100644 |
| --- a/runtime/bin/socket.dart |
| +++ b/runtime/bin/socket.dart |
| @@ -68,29 +68,31 @@ interface Socket factory _Socket { |
| int writeList(List<int> buffer, int offset, int count); |
| /* |
| - * The connect handler gets executed when connection to a given host |
| + * The connect handler gets called when connection to a given host |
| * succeeded. |
| */ |
| void set connectHandler(void callback()); |
| /* |
| - * The data handler gets executed when data becomes available at the socket. |
| + * The data handler gets called when data becomes available at the socket. |
| */ |
| void set dataHandler(void callback()); |
| /* |
| - * The write handler gets executed when the socket becomes available for |
| + * The write handler gets called when the socket becomes available for |
| * writing. |
| */ |
| void set writeHandler(void callback()); |
| /* |
| - * The error handler gets executed when a socket error occurs. |
| + * The end handler gets called when a the last byte have been read |
|
Mads Ager (google)
2011/11/04 10:19:49
end -> close and move to the closeHandler instead
Søren Gjesse
2011/11/04 12:15:11
Done.
|
| + * from a socket. At this point the socket might still be open for |
| + * writing for sending more data. |
| */ |
| void set errorHandler(void callback()); |
| /* |
| - * The close handler gets executed when the socket was closed. |
| + * The error handler gets called when a socket error occurs. |
|
Mads Ager (google)
2011/11/04 10:19:49
Move comment to errorHandler. ;-)
Søren Gjesse
2011/11/04 12:15:11
Done.
|
| */ |
| void set closeHandler(void callback()); |
| @@ -111,9 +113,12 @@ interface Socket factory _Socket { |
| /* |
| * Closes the socket. Calling [close] will never throw an exception |
| - * and calling it several times is supported. |
| + * and calling it several times is supported. If [halfClose] is true |
| + * the socket will only be closed for writing and it might still be |
| + * possible to read data. Calling [close] will not trigger a call to |
| + * the [closeHandler]. |
| */ |
| - void close(); |
| + void close([bool halfClose]); |
| } |