Created
May 19, 2020 07:42
-
-
Save riyafa/44bb33c34d3f6037b27e37cd71f3a1dd to your computer and use it in GitHub Desktop.
Simple WebSocket echo server written in Ballerina language
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; | |
service websocket on new http:Listener(15300) { | |
resource function onText(http:WebSocketCaller caller, string text, | |
boolean finalFrame) { | |
checkpanic caller->pushText(text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment