OLD | NEW |
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 factory _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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 * The close handler gets executed when the socket was closed. | 93 * The close handler gets executed when the socket was closed. |
94 */ | 94 */ |
95 void setCloseHandler(void callback()); | 95 void setCloseHandler(void callback()); |
96 | 96 |
97 /* | 97 /* |
98 * Returns input stream to the socket. | 98 * Returns input stream to the socket. |
99 */ | 99 */ |
100 InputStream get inputStream(); | 100 InputStream get inputStream(); |
101 | 101 |
102 /* | 102 /* |
| 103 * Returns input stream to the socket. |
| 104 */ |
| 105 InputStream2 get inputStream2(); |
| 106 |
| 107 /* |
103 * Returns output stream of the socket. | 108 * Returns output stream of the socket. |
104 */ | 109 */ |
105 OutputStream get outputStream(); | 110 OutputStream get outputStream(); |
106 | 111 |
107 /* | 112 /* |
108 * Returns the port used by this socket. | 113 * Returns the port used by this socket. |
109 */ | 114 */ |
110 int get port(); | 115 int get port(); |
111 | 116 |
112 /* | 117 /* |
113 * Closes the socket | 118 * Closes the socket |
114 */ | 119 */ |
115 void close(); | 120 void close(); |
116 } | 121 } |
117 | 122 |
118 | 123 |
119 class SocketIOException implements Exception { | 124 class SocketIOException implements Exception { |
120 const SocketIOException([String this.message = ""]); | 125 const SocketIOException([String this.message = ""]); |
121 String toString() => "SocketIOException: $message"; | 126 String toString() => "SocketIOException: $message"; |
122 | 127 |
123 /* | 128 /* |
124 * Contains the exception message. | 129 * Contains the exception message. |
125 */ | 130 */ |
126 final String message; | 131 final String message; |
127 } | 132 } |
OLD | NEW |