Skeleton of the debugger host.

This commit is contained in:
Ben Vanik 2013-02-01 05:37:42 -08:00
parent b6a9dfe7e0
commit c2fbafdc28
20 changed files with 679 additions and 2 deletions

42
debugger/debugger.js Normal file
View file

@ -0,0 +1,42 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2013 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
// TODO(benvanik): closure or something fancy
var DebugClient = function(endpoint) {
/**
* Target websocket endpoint.
* @type {string}
* @private
*/
this.endpoint_ = endpoint;
/**
* Connected socket.
* @type {!WebSocket}
* @private
*/
this.socket_ = new WebSocket(endpoint, []);
this.socket_.onopen = (function() {
console.log('opened');
}).bind(this);
this.socket_.onerror = (function(e) {
console.log('error', e);
}).bind(this);
this.socket_.onmessage = (function(e) {
console.log('message', e.data);
}).bind(this);
}
var client = new DebugClient('ws://127.0.0.1:6200');