Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can Jayson do "bidirectional" calling over websockets? #216

Open
darrencruse opened this issue Jan 23, 2023 · 1 comment
Open

can Jayson do "bidirectional" calling over websockets? #216

darrencruse opened this issue Jan 23, 2023 · 1 comment

Comments

@darrencruse
Copy link

darrencruse commented Jan 23, 2023

hi really just a question:

Using jayson can a browser (client) make an rpc call to the (node.js) server and then the server make an rpc call back to the browser client?

if so is there an example of that anywhere?

otherwise fwiw I do see some other json-rpc libraries showing examples of this ability when using websockets.

I didn't see a way to add handlers for rpc calls on the client object in the jayson api, but Is it conceivable an initial websocket connection could be established with browser as client and then would/could it be the node.js server could create a jayson client instance and the browser create a jayson server instance passing in that websocket connection?

i.e. to enable calls going in both directions?

@damartripamungkas
Copy link

hi really just a question:

Using jayson can a browser (client) make an rpc call to the (node.js) server and then the server make an rpc call back to the browser client?

if so is there an example of that anywhere?

otherwise fwiw I do see some other json-rpc libraries showing examples of this ability when using websockets.

I didn't see a way to add handlers for rpc calls on the client object in the jayson api, but Is it conceivable an initial websocket connection could be established with browser as client and then would/could it be the node.js server could create a jayson client instance and the browser create a jayson server instance passing in that websocket connection?

i.e. to enable calls going in both directions?

maybe you mean you want to do a webhook but use a websocket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants