▲ | vmg12 4 days ago | |
I see that it supports websockets for the transport layer, is there any support for two way communication? edit: was skimming the github repo https://github.com/cloudflare/capnweb/tree/main?tab=readme-o... and saw this which answers my question: > Supports passing functions by reference: If you pass a function over RPC, the recipient receives a "stub". When they call the stub, they actually make an RPC back to you, invoking the function where it was created. This is how bidirectional calling happens: the client passes a callback to the server, and then the server can call it later. > Similarly, supports passing objects by reference: If a class extends the special marker type RpcTarget, then instances of that class are passed by reference, with method calls calling back to the location where the object was created. Gonna skim some more to see if i can find some example code. | ||
▲ | pests 4 days ago | parent [-] | |
It seems peers are equal and there is no “server” or “client” role, just what you import/export from each. |