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

Side by Side Diff: bin/socket.dart

Issue 8949043: - Fix outdated use of factory clause. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bin/process.dart ('k') | bin/timer.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 factory _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);
11 11
12 /* 12 /*
13 * The connection handler gets called when there is a new incoming 13 * The connection handler gets called when there is a new incoming
14 * connection on the socket. 14 * connection on the socket.
15 */ 15 */
16 void set connectionHandler(void callback(Socket connection)); 16 void set connectionHandler(void callback(Socket connection));
17 17
18 /* 18 /*
19 * The error handler gets called when a socket error occurs. 19 * The error handler gets called when a socket error occurs.
20 */ 20 */
21 void set errorHandler(void callback()); 21 void set errorHandler(void callback());
22 22
23 /* 23 /*
24 * Returns the port used by this socket. 24 * Returns the port used by this socket.
25 */ 25 */
26 int get port(); 26 int get port();
27 27
28 /* 28 /*
29 * Closes the socket. 29 * Closes the socket.
30 */ 30 */
31 void close(); 31 void close();
32 } 32 }
33 33
34 34
35 interface Socket factory _Socket { 35 interface Socket default _Socket {
36 /* 36 /*
37 * Constructs a new socket and connects it to the given host on the given 37 * Constructs a new socket and connects it to the given host on the given
38 * port. 38 * port.
39 */ 39 */
40 Socket(String host, int port); 40 Socket(String host, int port);
41 41
42 /* 42 /*
43 * Returns the number of received and non-read bytes in the socket that 43 * Returns the number of received and non-read bytes in the socket that
44 * can be read. 44 * can be read.
45 */ 45 */
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 class SocketIOException implements Exception { 119 class SocketIOException implements Exception {
120 const SocketIOException([String this.message = ""]); 120 const SocketIOException([String this.message = ""]);
121 String toString() => "SocketIOException: $message"; 121 String toString() => "SocketIOException: $message";
122 122
123 /* 123 /*
124 * Contains the exception message. 124 * Contains the exception message.
125 */ 125 */
126 final String message; 126 final String message;
127 } 127 }
OLDNEW
« no previous file with comments | « bin/process.dart ('k') | bin/timer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698