2.2.13 • Published 6 years ago
melf v2.2.13
Melf
npm module to perform (a)synchronous remote procedure calls for JavaScript processes. Synchronous remote procedure calls can be interleaved (only) by locally declared remote procedures without deadlocks.
Client API
require("melf")(address, alias, callback)
address :: string | object | melf.Receptoralias :: stringcallback(error, melf)error :: Error | nullmelf :: melf.Melf
output = melf.rpcall(recipient, rpname, input)
recipient :: stringrpname :: stringinput :: JSONoutput :: JSON
melf.rpcall(recipient, rpname, input, (error, output) => {...})
recipient :: stringrpname :: stringinput :: JSONerror :: Error | nulloutput :: JSON
melf.rprocedures[rpname] = (origin, input, callback) => {...}
rpname :: stringorigin :: stringinput :: JSONcallback(error, output)error :: Error | nulloutput :: JSON
melf.destroy()
melf.terminate()
melf.onterminate = () => { ... }
Server API
distributor = require("melf/distributor")(logger)
logger(origin, recipient, meteor) | undefined | booleanorigin :: stringrecipient :: stringmeteor :: string
distributor :: melf.Distributor
listener = orchestrator.ConnectionListener()
listener(net.Socket)
middleware = distributor.RequestMiddleware(splitter)
splitter :: string | undefinedhandled = middleware(request, response, next)request :: http.Requestresponse :: http.Responsenext()handled :: boolean
middleware = distributor.UpgradeMiddleware(splitter)
splitter :: string | undefinedhandled = middleware(request, socket, head, next)request :: http.Requestsocket :: net.Sockethead :: Buffernext()handled :: boolean
2.2.13
6 years ago
2.2.12
7 years ago
2.2.11
7 years ago
2.2.10
7 years ago
2.2.9
7 years ago
2.2.8
7 years ago
2.2.7
7 years ago
2.2.6
7 years ago
2.2.5
7 years ago
2.2.4
7 years ago
2.2.3
7 years ago
2.2.1
7 years ago
2.2.0
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.15
7 years ago
2.0.14
7 years ago
2.0.13
7 years ago
2.0.12
7 years ago
2.0.11
7 years ago
2.0.10
7 years ago
2.0.9
7 years ago
2.0.8
7 years ago
2.0.7
7 years ago
2.0.5
7 years ago
2.0.4
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.0.5
8 years ago
0.0.3
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago
0.0.0
9 years ago