t
This commit is contained in:
parent
8a3f399b1f
commit
97393e3ce2
4 changed files with 45 additions and 7 deletions
|
@ -16,6 +16,14 @@ const available_targets = {
|
|||
g: new Target('g'),
|
||||
b: new Target('b'),
|
||||
stack: new Target('stack'),
|
||||
stack2: new Target('stack2'),
|
||||
stack3: new Target('stack3'),
|
||||
stack4: new Target('stack4'),
|
||||
stack5: new Target('stack5'),
|
||||
stack6: new Target('stack6'),
|
||||
stack6: new Target('stackr'),
|
||||
stack6: new Target('stackg'),
|
||||
stack6: new Target('stackb'),
|
||||
tick: new Target('tick'),
|
||||
index: new Target('index'),
|
||||
};
|
||||
|
@ -47,7 +55,11 @@ export const instructions = [
|
|||
{ n: 'MULTIPLY', a: true },
|
||||
{ n: 'DIVIDE', a: true },
|
||||
{ n: 'MODULO', a: true },
|
||||
{ n: 'FADE', a: true },
|
||||
{ n: 'RANDOM', a: false },
|
||||
{ n: 'JMP', a: false },
|
||||
{ n: 'JNZ', a: true },
|
||||
{ n: 'JEZ', a: true },
|
||||
];
|
||||
|
||||
export function initialize(ctx) {
|
||||
|
|
|
@ -15,6 +15,10 @@ function padLeft(size = 4, str = '') {
|
|||
export default function req(data, callback, errorCallback) {
|
||||
let string_data = JSON.stringify(data);
|
||||
let size = getBinarySize(string_data);
|
||||
if (size > 9999) {
|
||||
errorCallback("too long");
|
||||
return;
|
||||
}
|
||||
|
||||
let client = new net.Socket();
|
||||
client.connect(port, hostname, () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue