public class NettyWebSocketConnection extends AbstractHttpConnection implements WebSocketConnection
| 限定符和类型 | 字段和说明 |
|---|---|
private boolean |
hybi |
private byte[] |
outboundMaskingKey |
private String |
version |
| 构造器和说明 |
|---|
NettyWebSocketConnection(Executor executor,
NettyHttpRequest nettyHttpRequest,
org.jboss.netty.channel.ChannelHandlerContext ctx,
byte[] outboundMaskingKey) |
| 限定符和类型 | 方法和说明 |
|---|---|
NettyWebSocketConnection |
close() |
NettyWebSocketConnection |
data(String key,
Object value)
Store data value by key.
|
NettyWebSocketConnection |
ping(byte[] message)
Sends a ping frame
|
NettyWebSocketConnection |
pong(byte[] message)
Sends a pong frame
|
NettyWebSocketConnection |
send(byte[] message)
Sends a binary frame
|
NettyWebSocketConnection |
send(byte[] message,
int offset,
int length)
Sends a binary frame
|
NettyWebSocketConnection |
send(String message)
Sends a text frame
|
void |
setHybiWebSocketVersion(int webSocketVersion) |
(专用程序包) void |
setVersion(String version) |
String |
version() |
closeChannel, data, data, dataKeys, execute, handlerExecutor, httpRequest, putData, writeMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlerExecutor, httpRequestdata, data, dataKeysprivate final byte[] outboundMaskingKey
private String version
private boolean hybi
public NettyWebSocketConnection(Executor executor, NettyHttpRequest nettyHttpRequest, org.jboss.netty.channel.ChannelHandlerContext ctx, byte[] outboundMaskingKey)
public NettyWebSocketConnection send(String message)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadpublic NettyWebSocketConnection send(byte[] message)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadpublic NettyWebSocketConnection send(byte[] message, int offset, int length)
WebSocketConnectionsend 在接口中 WebSocketConnectionmessage - frame payloadoffset - The offset within the array of the first byte to be written; must be non-negative and no larger than message.lengthlength - The maximum number of bytes to be written to the given array; must be non-negative and no larger than message.length - offsetpublic NettyWebSocketConnection ping(byte[] message)
WebSocketConnectionping 在接口中 WebSocketConnectionmessage - the payload of the pingpublic NettyWebSocketConnection pong(byte[] message)
WebSocketConnectionpong 在接口中 WebSocketConnectionmessage - the payload of the pingpublic NettyWebSocketConnection close()
close 在接口中 HttpConnectionclose 在接口中 WebSocketConnectionpublic NettyWebSocketConnection data(String key, Object value)
DataHolderdata 在接口中 DataHolderdata 在接口中 WebSocketConnectionDataHolder.data()public String version()
version 在接口中 WebSocketConnectionvoid setVersion(String version)
public void setHybiWebSocketVersion(int webSocketVersion)
Copyright © 2014. All rights reserved.