Chromium Code Reviews| 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 interface ServerSocket default _ServerSocket { | 5 interface ServerSocket default _ServerSocket { |
| 6 /** | 6 /** |
| 7 * Constructs a new server socket, binds it to a given address and port, | 7 * Constructs a new server socket, binds it to a given address and port, |
| 8 * and listens on it. | 8 * and listens on it. |
| 9 */ | 9 */ |
| 10 ServerSocket(String bindAddress, int port, int backlog); | 10 ServerSocket(String bindAddress, int port, int backlog); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 * succeeded. | 67 * succeeded. |
| 68 */ | 68 */ |
| 69 void set onConnect(void callback()); | 69 void set onConnect(void callback()); |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * The data handler gets called when data becomes available at the socket. | 72 * The data handler gets called when data becomes available at the socket. |
| 73 */ | 73 */ |
| 74 void set onData(void callback()); | 74 void set onData(void callback()); |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * The write handler gets called when the socket becomes available for | 77 * The write handler gets called once when the socket becomes available for |
| 78 * writing. | 78 * writing. Then the handler is reset to null. This handler is used when |
|
Søren Gjesse
2012/07/06 04:02:11
is reset -> is automatically reset
Bill Hesse
2012/07/06 08:41:25
Done.
| |
| 79 * writeList has reported an incomplete write, to schedule writing the | |
| 80 * remaining data to the socket. | |
| 79 */ | 81 */ |
| 80 void set onWrite(void callback()); | 82 void set onWrite(void callback()); |
| 81 | 83 |
| 82 /** | 84 /** |
| 83 * The close handler gets called when a the last byte have been read | 85 * The close handler gets called when a the last byte have been read |
| 84 * from a socket. At this point the socket might still be open for | 86 * from a socket. At this point the socket might still be open for |
| 85 * writing for sending more data. | 87 * writing for sending more data. |
| 86 */ | 88 */ |
| 87 void set onClosed(void callback()); | 89 void set onClosed(void callback()); |
| 88 | 90 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 sb.add(" ($osError)"); | 146 sb.add(" ($osError)"); |
| 145 } | 147 } |
| 146 } else if (osError != null) { | 148 } else if (osError != null) { |
| 147 sb.add(": $osError"); | 149 sb.add(": $osError"); |
| 148 } | 150 } |
| 149 return sb.toString(); | 151 return sb.toString(); |
| 150 } | 152 } |
| 151 final String message; | 153 final String message; |
| 152 final OSError osError; | 154 final OSError osError; |
| 153 } | 155 } |
| OLD | NEW |