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

Socket.io like WebSockets #1709

Open
PatilShreyas opened this issue Mar 10, 2020 · 2 comments
Open

Socket.io like WebSockets #1709

PatilShreyas opened this issue Mar 10, 2020 · 2 comments
Assignees
Labels

Comments

@PatilShreyas
Copy link

Subsystem
WebSocket

Is your feature request related to a problem? Please describe.
It's not related to any problem.

Describe the solution you'd like
It would be nice to have socket.io like interface for [WebSockets].
For e.g. Interface like that would be nice:

    webSocket("/") { socket->
        // Emit value from server on "chat-message".
        socket.emit("chat-message", Frame.Text("YOU SAID $text"))

        // Below block will be executed whenever value will be emitted in "response".
        socket.on("response") { response->
            // Response received from client on "response".
        }
    }

Motivation to include to ktor
If such feature is implemented in ktor it'll make development much more easier. It'll help to make communication better among server and client. It'll provide high reliability.

@e5l e5l self-assigned this Mar 11, 2020
@oleg-larshin
Copy link

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@Velord
Copy link

Velord commented Mar 27, 2024

Any update ? If that will not be implemented, can you provide example how to achieve same functionality ? I mean how to achieve "routing" with current API ?

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

No branches or pull requests

4 participants