eu.luminis.websocket.Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmeter-websocket-samplers Show documentation
Show all versions of jmeter-websocket-samplers Show documentation
JMeter add-on that defines a number of samplers for load testing WebSocket applications.
The newest version!
package eu.luminis.websocket;
import java.net.URL;
public class Sample {
public static void main(String[] args) throws Exception {
WebSocketClient webSocketClient = new WebSocketClient(new URL("http://echo.websocket.org:80"));
webSocketClient.connect(5_000, 5_000);
webSocketClient.sendTextFrame("he, hello, hier venray");
Frame receivedFrame = webSocketClient.receiveFrame(5_000);
System.out.println("Received frame " + receivedFrame);
webSocketClient.close(1000, "", 5_000);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy