JavaScript is disabled on your browser.
Skip navigation links
io.netty.handler.codec.http.websocketx

Class WebSocketClientHandshaker

    • Field Detail

      • customHeaders

        protected final HttpHeaders customHeaders
    • Constructor Detail

      • WebSocketClientHandshaker

        protected WebSocketClientHandshaker(java.net.URI uri,
         WebSocketVersion version,
         java.lang.String subprotocol,
         HttpHeaders customHeaders,
         int maxFramePayloadLength)
        Base constructor
        Parameters:
        uri - URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be sent to this URL.
        version - Version of web socket specification to use to connect to the server
        subprotocol - Sub protocol request sent to the server.
        customHeaders - Map of custom headers to add to the client request
        maxFramePayloadLength - Maximum length of a frame's payload
    • Method Detail

      • uri

        public java.net.URI uri()
        Returns the URI to the web socket. e.g. "ws://myhost.com/path"
      • version

        public WebSocketVersion version()
        Version of the web socket specification that is being used
      • maxFramePayloadLength

        public int maxFramePayloadLength()
        Returns the max length for any frame's payload
      • isHandshakeComplete

        public boolean isHandshakeComplete()
        Flag to indicate if the opening handshake is complete
      • expectedSubprotocol

        public java.lang.String expectedSubprotocol()
        Returns the CSV of requested subprotocol(s) sent to the server as specified in the constructor
      • actualSubprotocol

        public java.lang.String actualSubprotocol()
        Returns the subprotocol response sent by the server. Only available after end of handshake. Null if no subprotocol was requested or confirmed by the server.
      • handshake

        public ChannelFuture handshake(Channel channel)
        Begins the opening handshake
        Parameters:
        channel - Channel
      • newHandshakeRequest

        protected abstract FullHttpRequest newHandshakeRequest()
        Returns a new {@link FullHttpRequest) which will be used for the handshake.
      • newWebsocketDecoder

        protected abstract WebSocketFrameDecoder newWebsocketDecoder()
        Returns the decoder to use after handshake is complete.
      • newWebSocketEncoder

        protected abstract WebSocketFrameEncoder newWebSocketEncoder()
        Returns the encoder to use after the handshake is complete.
Skip navigation links

Copyright © 2008–2018 The Netty Project. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /