mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-14 01:14:25 +00:00
c66ae7b2e4
Launch an Xspice and run: echo -ne "\033]844;127.0.0.1;9876\007" This will launch a SPiCE client connecting to 127.0.0.1:9876. Still need to add all the security stuff and generally be more defensive in the implementation.
28 lines
643 B
JavaScript
28 lines
643 B
JavaScript
wdi.SpiceChannel = $.spcExtend(wdi.EventObject.prototype, {
|
|
socketQ: null,
|
|
packetReassembler: null,
|
|
|
|
init: function (c) {
|
|
this.superInit();
|
|
var socketQ = c.socketQ || new wdi.SocketQueue();
|
|
this.socketQ = socketQ;
|
|
this.packetReassembler = c.packetReassembler || wdi.ReassemblerFactory.getPacketReassembler(socketQ);
|
|
this.setListeners();
|
|
},
|
|
|
|
setListeners: function () {
|
|
this.packetReassembler.addListener('packetComplete', function (e) {
|
|
this.send(e);
|
|
}, this);
|
|
},
|
|
|
|
connect: function (uri) {
|
|
this.socketQ.connect(uri);
|
|
this.packetReassembler.start();
|
|
},
|
|
|
|
send: function (data) {
|
|
this.fire('send', data);
|
|
}
|
|
});
|