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

Adds support for client-to-server websockets #605

Merged
merged 3 commits into from
Sep 18, 2020
Merged

Adds support for client-to-server websockets #605

merged 3 commits into from
Sep 18, 2020

Conversation

Badgerati
Copy link
Owner

Description of the Change

Adds support for client-to-server websockets - allowing clients to send messages to the Pode server, and Pode automatically re-broadcasts to signal back out to connected clients.

Related Issue

Resolves #585

Examples

There isn't really a decent example, as it's mostly all backend, but .send on a websocket is now supported:

ws.send(JSON.stringify({
    message: $('input[name=message]').val()
}));

Also, messages sent must be of JSON format, as follows:

{
    "message": "some message",
    "path": "/",
    "clientId": ""
}

Only "message" is mandatory.

@Badgerati Badgerati added this to the 2.0.0 milestone Sep 17, 2020
@Badgerati Badgerati self-assigned this Sep 17, 2020
@Badgerati Badgerati merged commit 2dec223 into develop Sep 18, 2020
@Badgerati Badgerati deleted the Issue-585 branch September 18, 2020 17:32
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.

2.0: Can we do client-to-server web sockets now?
1 participant