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 #library("proxy"); | 5 #library("proxy"); |
| 6 #import("dart:isolate"); |
6 | 7 |
7 /** | 8 /** |
8 * Base class for all RpcProxy's | 9 * Base class for all RpcProxy's |
9 * | 10 * |
10 * RpcProxy objects run in the "client" isolate and have a SendPort which | 11 * RpcProxy objects run in the "client" isolate and have a SendPort which |
11 * they use to send messages to RpcReceiver objects running in a "service" | 12 * they use to send messages to RpcReceiver objects running in a "service" |
12 * isolate. | 13 * isolate. |
13 */ | 14 */ |
14 | 15 |
15 class RpcProxy { | 16 class RpcProxy { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 if (object === null || !(object is String)) { | 231 if (object === null || !(object is String)) { |
231 return null; | 232 return null; |
232 } | 233 } |
233 String s = object; | 234 String s = object; |
234 if (!s.startsWith(prefix)) { | 235 if (!s.startsWith(prefix)) { |
235 return null; | 236 return null; |
236 } | 237 } |
237 return new RpcException(s.substring(prefix.length, s.length)); | 238 return new RpcException(s.substring(prefix.length, s.length)); |
238 } | 239 } |
239 } | 240 } |
OLD | NEW |