Search in sources :

Example 26 with ExtensionConfig

use of org.eclipse.jetty.websocket.api.extensions.ExtensionConfig in project jetty.project by eclipse.

the class BlockheadClient method getExtensionConfigs.

private List<ExtensionConfig> getExtensionConfigs(HttpResponse response) {
    List<ExtensionConfig> configs = new ArrayList<>();
    String econf = response.getHeader("Sec-WebSocket-Extensions");
    if (econf != null) {
        LOG.debug("Found Extension Response: {}", econf);
        ExtensionConfig config = ExtensionConfig.parse(econf);
        configs.add(config);
    }
    return configs;
}
Also used : ExtensionConfig(org.eclipse.jetty.websocket.api.extensions.ExtensionConfig) ArrayList(java.util.ArrayList)

Aggregations

ExtensionConfig (org.eclipse.jetty.websocket.api.extensions.ExtensionConfig)26 ArrayList (java.util.ArrayList)11 Test (org.junit.Test)11 WebSocketFrame (org.eclipse.jetty.websocket.common.WebSocketFrame)10 TextFrame (org.eclipse.jetty.websocket.common.frames.TextFrame)10 ByteBuffer (java.nio.ByteBuffer)9 Frame (org.eclipse.jetty.websocket.api.extensions.Frame)8 ContinuationFrame (org.eclipse.jetty.websocket.common.frames.ContinuationFrame)7 PingFrame (org.eclipse.jetty.websocket.common.frames.PingFrame)7 FragmentExtension (org.eclipse.jetty.websocket.common.extensions.fragment.FragmentExtension)5 IncomingFramesCapture (org.eclipse.jetty.websocket.common.test.IncomingFramesCapture)5 AbstractExtensionTest (org.eclipse.jetty.websocket.common.extensions.AbstractExtensionTest)4 OutgoingFramesCapture (org.eclipse.jetty.websocket.common.test.OutgoingFramesCapture)4 IOException (java.io.IOException)3 WebSocketPolicy (org.eclipse.jetty.websocket.api.WebSocketPolicy)3 ExtensionStack (org.eclipse.jetty.websocket.common.extensions.ExtensionStack)3 Extension (org.eclipse.jetty.websocket.api.extensions.Extension)2 Generator (org.eclipse.jetty.websocket.common.Generator)2 IdentityExtension (org.eclipse.jetty.websocket.common.extensions.identity.IdentityExtension)2 OutgoingNetworkBytesCapture (org.eclipse.jetty.websocket.common.test.OutgoingNetworkBytesCapture)2