| 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 class ContinuationPair { | 5 class ContinuationPair { |
| 6 final Success sk; | 6 final Success sk; |
| 7 final Failure fk; | 7 final Failure fk; |
| 8 const ContinuationPair(this.sk, this.fk); | 8 const ContinuationPair(this.sk, this.fk); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 | 122 |
| 123 PongMsg() : super() { } | 123 PongMsg() : super() { } |
| 124 | 124 |
| 125 Map toJSON() => { 'op': 'pong' }; | 125 Map toJSON() => { 'op': 'pong' }; |
| 126 | 126 |
| 127 void respond(BcapTunnelImpl tunnel) { | 127 void respond(BcapTunnelImpl tunnel) { |
| 128 // nothing to do | 128 // nothing to do |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 interface BcapTunnel extends BcapServerInterface factory BcapTunnelImpl { | 132 interface BcapTunnel extends BcapServerInterface default BcapTunnelImpl { |
| 133 | 133 |
| 134 void sendOutpost(var msg); | 134 void sendOutpost(var msg); |
| 135 | 135 |
| 136 BcapTunnel(BelayPort port, Resolver resolver, Function outpostHandler); | 136 BcapTunnel(BelayPort port, Resolver resolver, Function outpostHandler); |
| 137 } | 137 } |
| 138 | 138 |
| 139 typedef void OutpostHandler(Map outpostData); | 139 typedef void OutpostHandler(Map outpostData); |
| 140 | 140 |
| 141 class BcapTunnelImpl implements BcapServerInterface { | 141 class BcapTunnelImpl implements BcapServerInterface { |
| 142 | 142 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 164 }); | 164 }); |
| 165 } | 165 } |
| 166 | 166 |
| 167 void sendOutpost(data) { | 167 void sendOutpost(data) { |
| 168 port.postMessage((new OutpostMsg(data)).toJSON()); | 168 port.postMessage((new OutpostMsg(data)).toJSON()); |
| 169 } | 169 } |
| 170 } | 170 } |
| 171 | 171 |
| 172 | 172 |
| 173 | 173 |
| OLD | NEW |