OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 /// Provides common infrastructure for reading commads from a [Stream]. | 5 /// Provides common infrastructure for reading commads from a [Stream]. |
6 /// | 6 /// |
7 /// We have two independent command kinds that follow the same scheme: | 7 /// We have two independent command kinds that follow the same scheme: |
8 /// | 8 /// |
9 /// 1. ../vm_commands.dart | 9 /// 1. ../vm_commands.dart |
10 /// 2. hub/client_commands.dart | 10 /// 2. hub/client_commands.dart |
11 /// | 11 /// |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // https://github.com/dart-lang/sdk/issues/23953 | 214 // https://github.com/dart-lang/sdk/issues/23953 |
215 buffer = new Uint8List.fromList( | 215 buffer = new Uint8List.fromList( |
216 buffer.buffer.asUint8List(buffer.offsetInBytes + offset)); | 216 buffer.buffer.asUint8List(buffer.offsetInBytes + offset)); |
217 assert(buffer.offsetInBytes == 0); | 217 assert(buffer.offsetInBytes == 0); |
218 offset = 0; | 218 offset = 0; |
219 } | 219 } |
220 return buffer.buffer.asByteData(buffer.offsetInBytes) | 220 return buffer.buffer.asByteData(buffer.offsetInBytes) |
221 .getFloat64(offset, commandEndianness); | 221 .getFloat64(offset, commandEndianness); |
222 } | 222 } |
223 } | 223 } |
OLD | NEW |