static class Injection {
int vmPort;
S injectionID;
}
static L<Injection> injectToAll(S progID) {
new L<Injection> l;
S line = format3("Please inject program *.", progID);
for (DialogIO injectionPoint : talkToAll("This is a JavaX VM."))
try {
injectionPoint.readLine();
S answer = injectionPoint.askLoudly(line);
new Matches m;
if (match3("OK. Injection ID: *", answer, m)) {
new Injection i;
i.vmPort = injectionPoint.getSocket().getPort();
i.injectionID = m.unq(0);
l.add(i);
} // just ignore for now if bad result
} finally {
injectionPoint.close();
}
ret l;
}download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1001632 |
| Snippet name: | injectToAll - inject code to all VMs |
| Eternal ID of this version: | #1001632/1 |
| Text MD5: | cde0d06dda8e3a3384c9bbe4bbdf04af |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-10-30 14:47:04 |
| Source code size: | 693 bytes / 27 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 912 / 1130 |
| Referenced in: | #1001711 - injectTo - inject code to one VM #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) |