程序包 | 说明 |
---|---|
io.netty.example.http.file | |
io.netty.example.http.websocketx.server |
This package contains an example web socket web server.
|
io.netty.handler.codec.http |
Encoder, decoder and their related message types for HTTP.
|
io.netty.handler.codec.http.websocketx |
Encoder, decoder, handshakers and their related message types for
Web Socket data frames.
|
限定符和类型 | 方法和说明 |
---|---|
void |
HttpStaticFileServerHandler.channelRead0(ChannelHandlerContext ctx,
FullHttpRequest request) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
WebSocketIndexPageHandler.channelRead0(ChannelHandlerContext ctx,
FullHttpRequest req) |
限定符和类型 | 类和说明 |
---|---|
class |
DefaultFullHttpRequest
Default implementation of
FullHttpRequest . |
限定符和类型 | 方法和说明 |
---|---|
FullHttpRequest |
FullHttpRequest.copy() |
FullHttpRequest |
DefaultFullHttpRequest.copy() |
FullHttpRequest |
DefaultFullHttpRequest.duplicate() |
FullHttpRequest |
FullHttpRequest.retain() |
FullHttpRequest |
DefaultFullHttpRequest.retain() |
FullHttpRequest |
FullHttpRequest.retain(int increment) |
FullHttpRequest |
DefaultFullHttpRequest.retain(int increment) |
FullHttpRequest |
FullHttpRequest.setMethod(HttpMethod method) |
FullHttpRequest |
DefaultFullHttpRequest.setMethod(HttpMethod method) |
FullHttpRequest |
FullHttpRequest.setProtocolVersion(HttpVersion version) |
FullHttpRequest |
DefaultFullHttpRequest.setProtocolVersion(HttpVersion version) |
FullHttpRequest |
FullHttpRequest.setUri(java.lang.String uri) |
FullHttpRequest |
DefaultFullHttpRequest.setUri(java.lang.String uri) |
限定符和类型 | 方法和说明 |
---|---|
protected FullHttpRequest |
WebSocketClientHandshaker13.newHandshakeRequest()
/**
Sends the opening request to the server:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
|
protected FullHttpRequest |
WebSocketClientHandshaker08.newHandshakeRequest()
/**
Sends the opening request to the server:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 8
|
protected FullHttpRequest |
WebSocketClientHandshaker07.newHandshakeRequest()
/**
Sends the opening request to the server:
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Sec-WebSocket-Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 7
|
protected FullHttpRequest |
WebSocketClientHandshaker00.newHandshakeRequest()
Sends the opening request to the server:
GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
Host: example.com
Origin: http://example.com
Sec-WebSocket-Key1: 4 @1 46546xW%0l 1 5
Sec-WebSocket-Key2: 12998 5 Y3 1 .P00
^n:ds[4U
|
protected abstract FullHttpRequest |
WebSocketClientHandshaker.newHandshakeRequest()
Returns a new {@link FullHttpRequest) which will be used for the handshake.
|
限定符和类型 | 方法和说明 |
---|---|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
FullHttpRequest req)
Performs the opening handshake.
|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
FullHttpRequest req,
HttpHeaders responseHeaders,
ChannelPromise promise)
Performs the opening handshake
When call this method you MUST NOT retain the
FullHttpRequest which is passed in. |
protected FullHttpResponse |
WebSocketServerHandshaker13.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi versions 13-17.
|
protected FullHttpResponse |
WebSocketServerHandshaker08.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 8 to 10.
|
protected FullHttpResponse |
WebSocketServerHandshaker07.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 7.
|
protected FullHttpResponse |
WebSocketServerHandshaker00.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 0 and lower.
|
protected abstract FullHttpResponse |
WebSocketServerHandshaker.newHandshakeResponse(FullHttpRequest req,
HttpHeaders responseHeaders)
Returns a new {@link FullHttpResponse) which will be used for as response to the handshake request.
|