| Index: pkg/dartino_agent/lib/agent_connection.dart
|
| diff --git a/pkg/fletch_agent/lib/agent_connection.dart b/pkg/dartino_agent/lib/agent_connection.dart
|
| similarity index 84%
|
| rename from pkg/fletch_agent/lib/agent_connection.dart
|
| rename to pkg/dartino_agent/lib/agent_connection.dart
|
| index ecf7f9c9cc2361fd6fbbb9ad7c69446e1a6f0b12..fa546ddcd70b7b13ed18556fc6390b94514bc973 100644
|
| --- a/pkg/fletch_agent/lib/agent_connection.dart
|
| +++ b/pkg/dartino_agent/lib/agent_connection.dart
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE.md file.
|
|
|
| -library fletch_agent.agent_connection;
|
| +library dartino_agent.agent_connection;
|
|
|
| import 'dart:async';
|
| import 'dart:io';
|
| @@ -10,8 +10,8 @@ import 'dart:typed_data';
|
|
|
| import 'messages.dart';
|
|
|
| -/// This class is used to connect to the Fletch Agent from Dart code. Ie. it
|
| -/// cannot be used from Fletch code as it is depending on the dart:io Socket
|
| +/// This class is used to connect to the Dartino Agent from Dart code. Ie. it
|
| +/// cannot be used from Dartino code as it is depending on the dart:io Socket
|
| /// class.
|
| /// The class is only for making a one-shot request/reply. The peer socket is
|
| /// closed after handling the request. This is similar to HTTP without
|
| @@ -28,7 +28,7 @@ class AgentConnection {
|
| var replyBuffer = await sendRequest(request);
|
| var reply = new StartVmReply.fromBuffer(replyBuffer);
|
| if (reply.result == ReplyHeader.START_VM_FAILED) {
|
| - throw new AgentException('Failed to start new Fletch VM.');
|
| + throw new AgentException('Failed to start new Dartino VM.');
|
| } else if (reply.result != ReplyHeader.SUCCESS) {
|
| throw new AgentException(
|
| 'Failed to spawn new VM with unexpected error: ${reply.result}');
|
| @@ -70,20 +70,20 @@ class AgentConnection {
|
| var replyBuffer = await sendRequest(request);
|
| var reply = new UpgradeAgentReply.fromBuffer(replyBuffer);
|
| if (reply.result != ReplyHeader.SUCCESS) {
|
| - throw new AgentException('Failed to upgrade fletch-agent package '
|
| + throw new AgentException('Failed to upgrade dartino-agent package '
|
| 'with unexpected error: ${reply.result}');
|
| }
|
| }
|
|
|
| - Future<String> fletchVersion() async {
|
| - var request = new FletchVersionRequest();
|
| + Future<String> dartinoVersion() async {
|
| + var request = new DartinoVersionRequest();
|
| var replyBuffer = await sendRequest(request);
|
| - var reply = new FletchVersionReply.fromBuffer(replyBuffer);
|
| + var reply = new DartinoVersionReply.fromBuffer(replyBuffer);
|
| if (reply.result != ReplyHeader.SUCCESS) {
|
| - throw new AgentException('Failed to retrive Fletch version '
|
| + throw new AgentException('Failed to retrive Dartino version '
|
| 'with unexpected error: ${reply.result}');
|
| }
|
| - return reply.fletchVersion;
|
| + return reply.dartinoVersion;
|
| }
|
|
|
| Future<ByteBuffer> sendRequest(RequestHeader request) async {
|
|
|