Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1004750 // rpc - remote procedure call (to a methodsBot) on local machine

JavaX fragment (include)

static O rpc(S botName, S method, O... args) {
  ret unstructure_matchOK2OrFail(
    sendToLocalBot(botName, rpc_makeCall(method, args)));
}

static O rpc(DialogIO bot, S method, O... args) {
  ret unstructure_matchOK2OrFail(
    bot.ask(rpc_makeCall(method, args)));
}

static S rpc_makeCall(S method, O... args) {
  if (empty(args))
    ret "call " + method;
  ret format("call *", concatLists((L) ll(method), asList(args)));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004750
Snippet name: rpc - remote procedure call (to a methodsBot) on local machine
Eternal ID of this version: #1004750/7
Text MD5: bd717956311b52f36bda3c48a773a803
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-20 14:16:56
Source code size: 443 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 593 / 572
Version history: 6 change(s)
Referenced in: [show references]