OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * The RawServerSocket is a server socket, providing a stream of low-level | 8 * The RawServerSocket is a server socket, providing a stream of low-level |
9 * [RawSocket]s. | 9 * [RawSocket]s. |
10 * | 10 * |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 String get remoteHost; | 209 String get remoteHost; |
210 int get remotePort; | 210 int get remotePort; |
211 } | 211 } |
212 | 212 |
213 | 213 |
214 class SocketIOException implements Exception { | 214 class SocketIOException implements Exception { |
215 const SocketIOException([String this.message = "", | 215 const SocketIOException([String this.message = "", |
216 OSError this.osError = null]); | 216 OSError this.osError = null]); |
217 String toString() { | 217 String toString() { |
218 StringBuffer sb = new StringBuffer(); | 218 StringBuffer sb = new StringBuffer(); |
219 sb.add("SocketIOException"); | 219 sb.write("SocketIOException"); |
220 if (!message.isEmpty) { | 220 if (!message.isEmpty) { |
221 sb.add(": $message"); | 221 sb.write(": $message"); |
222 if (osError != null) { | 222 if (osError != null) { |
223 sb.add(" ($osError)"); | 223 sb.write(" ($osError)"); |
224 } | 224 } |
225 } else if (osError != null) { | 225 } else if (osError != null) { |
226 sb.add(": $osError"); | 226 sb.write(": $osError"); |
227 } | 227 } |
228 return sb.toString(); | 228 return sb.toString(); |
229 } | 229 } |
230 final String message; | 230 final String message; |
231 final OSError osError; | 231 final OSError osError; |
232 } | 232 } |
OLD | NEW |