Class CloseWebSocketFrame

    • Constructor Detail

      • CloseWebSocketFrame

        public CloseWebSocketFrame​(BufferAllocator allocator,
                                   WebSocketCloseStatus status)
        Creates a new empty close frame with closing status code and reason text
        Parameters:
        allocator - BufferAllocator to use for allocating data.
        status - Status code as per RFC 6455. For example, 1000 indicates normal closure.
      • CloseWebSocketFrame

        public CloseWebSocketFrame​(BufferAllocator allocator,
                                   WebSocketCloseStatus status,
                                   String reasonText)
        Creates a new empty close frame with closing status code and reason text
        Parameters:
        allocator - BufferAllocator to use for allocating data.
        status - Status code as per RFC 6455. For example, 1000 indicates normal closure.
        reasonText - Reason text. Set to null if no text.
      • CloseWebSocketFrame

        public CloseWebSocketFrame​(BufferAllocator allocator,
                                   int statusCode,
                                   String reasonText)
        Creates a new empty close frame with closing status code and reason text
        Parameters:
        allocator - BufferAllocator to use for allocating data.
        statusCode - Integer status code as per RFC 6455. For example, 1000 indicates normal closure.
        reasonText - Reason text. Set to null if no text.
      • CloseWebSocketFrame

        public CloseWebSocketFrame​(BufferAllocator allocator,
                                   boolean finalFragment,
                                   int rsv)
        Creates a new close frame with no losing status code and no reason text
        Parameters:
        allocator - BufferAllocator to use for allocating data.
        finalFragment - flag indicating if this frame is the final fragment
        rsv - reserved bits used for protocol extensions.
      • CloseWebSocketFrame

        public CloseWebSocketFrame​(BufferAllocator allocator,
                                   boolean finalFragment,
                                   int rsv,
                                   int statusCode,
                                   String reasonText)
        Creates a new close frame with closing status code and reason text
        Parameters:
        finalFragment - flag indicating if this frame is the final fragment
        rsv - reserved bits used for protocol extensions
        statusCode - Integer status code as per RFC 6455. For example, 1000 indicates normal closure.
        reasonText - Reason text. Set to null if no text.
      • CloseWebSocketFrame

        public CloseWebSocketFrame​(boolean finalFragment,
                                   int rsv,
                                   Buffer binaryData)
        Creates a new close frame
        Parameters:
        finalFragment - flag indicating if this frame is the final fragment
        rsv - reserved bits used for protocol extensions
        binaryData - the content of the frame. Must be 2 byte integer followed by optional UTF-8 encoded string.