Skip to content

Commit

Permalink
Rename _VMWebsocketConnection -> _Connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Jun 2, 2015
1 parent 52436aa commit a20d73b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/devtools.dart
Expand Up @@ -12,7 +12,7 @@ import 'package:logging/logging.dart';
final Logger _log = new Logger('coverage.src.devtools');

class VMService {
final _VMWebsocketConnection _connection;
final _Connection _connection;

VMService._(this._connection);

Expand Down Expand Up @@ -86,7 +86,7 @@ class VMService {
}

static Future<VMService> connectToVMWebsocket(String host, int port) async {
var connection = await _VMWebsocketConnection.connect(host, port);
var connection = await _Connection.connect(host, port);
return new VMService._(connection);
}

Expand Down Expand Up @@ -161,20 +161,20 @@ class AllocationProfile {
}

/// Observatory connection via websocket.
class _VMWebsocketConnection {
class _Connection {
final WebSocket _socket;
final Map<int, Completer> _pendingRequests = {};
int _requestId = 1;

_VMWebsocketConnection(this._socket) {
_Connection(this._socket) {
_socket.listen(_handleResponse);
}

static Future<_VMWebsocketConnection> connect(String host, int port) async {
static Future<_Connection> connect(String host, int port) async {
_log.fine('Connecting to VM via HTTP websocket protocol');
var uri = 'ws://$host:$port/ws';
var socket = await WebSocket.connect(uri);
return new _VMWebsocketConnection(socket);
return new _Connection(socket);
}

Future<Map> request(String method, [Map params = const {}]) {
Expand Down

0 comments on commit a20d73b

Please sign in to comment.