Last active
October 5, 2020 07:31
-
-
Save kalaiyarasiganeshalingam/b948c44202797dafdf20eede75720278 to your computer and use it in GitHub Desktop.
server with a single resource
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ballerina/http; | |
| import ballerina/log; | |
| @http:WebSocketServiceConfig { | |
| path: "/hello/ws" | |
| } | |
| service basic on new http:Listener(21005) { | |
| // The resource is triggered after a successful client connection | |
| resource function onOpen(http:WebSocketCaller caller) { | |
| log:printInfo("connection open"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment