| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Enable the extension with reference to both a server and client example as follow: PerMessageDeflateExample
WebSocket Per-Message Compression Extension
1.1 DeflateClient:
private static final Draft perMessageDeflateDraft = new Draft_6455(new PerMessageDeflateExtension());
private static class DeflateClient extends WebSocketClient {
public DeflateClient() throws URISyntaxException {
super(new URI("ws://localhost:" + PORT), perMessageDeflateDraft);
}
1.2 DefalteServer:
private static class DeflateServer extends WebSocketServer {
public DeflateServer() {
super(new InetSocketAddress(PORT), Collections.singletonList(perMessageDeflateDraft));
}
| Back | FazBrowse Home | New Git URL |