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 /** | 5 /** |
6 * File, socket, HTTP, and other I/O support for server applications. | 6 * File, socket, HTTP, and other I/O support for server applications. |
7 * | 7 * |
8 * The I/O library is used for Dart server applications, | 8 * The I/O library is used for Dart server applications, |
9 * which run on a stand-alone Dart VM from the command line. | 9 * which run on a stand-alone Dart VM from the command line. |
10 * *This library does not work in browser-based applications.* | 10 * *This library does not work in browser-based applications.* |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 * The client connects to the WebSocket using the `connect()` method | 121 * The client connects to the WebSocket using the `connect()` method |
122 * and a URI that uses the Web Socket protocol. | 122 * and a URI that uses the Web Socket protocol. |
123 * The the client can write to the WebSocket with the `add()` method. | 123 * The the client can write to the WebSocket with the `add()` method. |
124 * For example, | 124 * For example, |
125 * | 125 * |
126 * WebSocket.connect('ws://127.0.0.1:4040/ws').then((socket) { | 126 * WebSocket.connect('ws://127.0.0.1:4040/ws').then((socket) { |
127 * socket.add('Hello, World!'); | 127 * socket.add('Hello, World!'); |
128 * }); | 128 * }); |
129 * | 129 * |
130 * Check out the | 130 * Check out the |
131 * [dartiverse_search](https://code.google.com/p/dart/source/browse/branches/ble
eding_edge/dart/samples/dartiverse_search) | 131 * [dartiverse_search](https://github.com/dart-lang/sample-dartiverse-search) |
132 * sample for a client/server pair that uses | 132 * sample for a client/server pair that uses |
133 * WebSockets to communicate. | 133 * WebSockets to communicate. |
134 * | 134 * |
135 * ## Socket and ServerSocket | 135 * ## Socket and ServerSocket |
136 * | 136 * |
137 * Clients and servers use [Socket]s to communicate using the TCP protocol. | 137 * Clients and servers use [Socket]s to communicate using the TCP protocol. |
138 * Use [ServerSocket] on the server side and [Socket] on the client. | 138 * Use [ServerSocket] on the server side and [Socket] on the client. |
139 * The server creates a listening socket using the `bind()` method and | 139 * The server creates a listening socket using the `bind()` method and |
140 * then listens for incoming connections on the socket. For example: | 140 * then listens for incoming connections on the socket. For example: |
141 * | 141 * |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 part 'process.dart'; | 235 part 'process.dart'; |
236 part 'service_object.dart'; | 236 part 'service_object.dart'; |
237 part 'socket.dart'; | 237 part 'socket.dart'; |
238 part 'stdio.dart'; | 238 part 'stdio.dart'; |
239 part 'string_transformer.dart'; | 239 part 'string_transformer.dart'; |
240 part 'timer_impl.dart'; | 240 part 'timer_impl.dart'; |
241 part 'secure_socket.dart'; | 241 part 'secure_socket.dart'; |
242 part 'secure_server_socket.dart'; | 242 part 'secure_server_socket.dart'; |
243 part 'websocket.dart'; | 243 part 'websocket.dart'; |
244 part 'websocket_impl.dart'; | 244 part 'websocket_impl.dart'; |
OLD | NEW |