Servoy 7+, Maven and Java (jdk) 1.7+ installed
Compile the source and build the zip file:
mvn clean package
Unzip the resulting zipfile in your Servoy plugins directory:
cd /path/to/servoy/application_server/plugins
unzip /path/to/this/plugin/servoy-wsclient-plugin/target/servoy-wsclient-plugin*.zip
(Re)start Servoy Developer.
var wsclient = null;
function ws_echo() {
wsclient = plugins.wsclient.createClient();
wsclient.setOnOpen(ws_onopen);
wsclient.setOnMessage(ws_onmessage);
wsclient.connect('ws://echo.websocket.org');
}
function ws_onopen() {
application.output('Opened');
wsclient.sendText('Hello');
}
function ws_onmessage(event) {
application.output('Incoming message: ' + event.data)
}
- Tyrus - The open source JSR 356 - Java API for WebSocket reference implementation
- Rob Gansevles - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details