mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-05 06:35:11 +00:00
Skeleton of the debugger host.
This commit is contained in:
parent
b6a9dfe7e0
commit
c2fbafdc28
20 changed files with 679 additions and 2 deletions
42
debugger/debugger.js
Normal file
42
debugger/debugger.js
Normal 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');
|
||||
Loading…
Add table
Add a link
Reference in a new issue