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

Websockets Support And Dual RPC Support #5

Merged
merged 3 commits into from
Oct 31, 2022

Conversation

Rishi556
Copy link
Contributor

This PR adds support for websockets in the JSON RPC. It comes with the following config options:

"rpcWebsockets" : {
        "enabled" : true,
        "port" : 5002
    }

The methods are the same as with HTTP, except there's just one path and it follows the hive style of METHOD_FAMILY.METHOD_NAME, for example:

{ "jsonrpc": "2.0", "method": "contracts.getContract", "params" : {"name" : "tokens"},  "id": 0 }

which would be a call to /contracts with the method getContract. The other METHOD_FAMILY is blockchain for /blockchain requests.

This type of requests can be done via HTTP as well, by providing no path. So the same request from above can be called to /.

Copy link
Contributor

@bt-cryptomancer bt-cryptomancer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, will include in next minor version release.

@bt-cryptomancer bt-cryptomancer merged commit 4b3e89f into hive-engine:main Oct 31, 2022
@Rishi556 Rishi556 deleted the upgrade-jayson branch May 1, 2023 03:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants