@@ -0,0 +1,962 @@
+package com.firefly.example.webscoket;%0A%0Aimport com.firefly.$;%0Aimport com.firefly.client.websocket.SimpleWebSocketClient;%0Aimport com.firefly.server.websocket.SimpleWebSocketServer;%0A%0A/**%0A * @author Pengtao Qiu%0A */%0Apublic class WebSocketExtensionDemo %7B%0A    public static void main(String%5B%5D args) %7B%0A        SimpleWebSocketServer server = $.createWebSocketServer();%0A        server.webSocket(%22/helloWebSocket%22)%0A              .onConnect(conn -%3E conn.sendText(%22OK.%22))%0A              .onText((text, conn) -%3E System.out.println(%22The server received: %22 + text))%0A              .listen(%22localhost%22, 8080);%0A%0A        SimpleWebSocketClient client = $.createWebSocketClient();%0A        client.webSocket(%22ws://localhost:8080/helloWebSocket%22)%0A              .addExtension(%22permessage-deflate%22)%0A              .onText((text, conn) -%3E System.out.println(%22The client received: %22 + text))%0A              .connect()%0A              .thenAccept(conn -%3E conn.sendText(%22Hello server.%22));%0A    %7D%0A%7D%0A

add WebSocket extension demo