Module bus.http

Class WebSocketProtocol

java.lang.Object
org.miaixz.bus.http.socket.WebSocketProtocol

public final class WebSocketProtocol extends Object
Constants and utility methods for the WebSocket protocol (RFC 6455).
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • WebSocketProtocol

      public WebSocketProtocol()
  • Method Details

    • acceptHeader

      public static String acceptHeader(String key)
      Computes the `Sec-WebSocket-Accept` header value from a client's key.
      Parameters:
      key - The `Sec-WebSocket-Key` from the client.
      Returns:
      The corresponding `Sec-WebSocket-Accept` value for the server's response.