org.eclipse.jetty.websocket
类 WebSocketConnectionRFC6455
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.websocket.WebSocketConnectionRFC6455
- 所有已实现的接口:
- Connection, AsyncConnection, WebSocketConnection
- 直接已知子类:
- WebSocketServletConnectionRFC6455
public class WebSocketConnectionRFC6455
- extends AbstractConnection
- implements WebSocketConnection
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-------+-+-------------+-------------------------------+
|F|R|R|R| opcode|M| Payload len | Extended payload length |
|I|S|S|S| (4) |A| (7) | (16/64) |
|N|V|V|V| |S| | (if payload len==126/127) |
| |1|2|3| |K| | |
+-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
| Extended payload length continued, if payload len == 127 |
+ - - - - - - - - - - - - - - - +-------------------------------+
| |Masking-key, if MASK set to 1 |
+-------------------------------+-------------------------------+
| Masking-key (continued) | Payload Data |
+-------------------------------- - - - - - - - - - - - - - - - +
: Payload Data continued ... :
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
| Payload Data continued ... |
+---------------------------------------------------------------+
|
构造方法摘要 |
WebSocketConnectionRFC6455(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol,
List<Extension> extensions,
int draft)
|
WebSocketConnectionRFC6455(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol,
List<Extension> extensions,
int draft,
MaskGen maskgen)
|
WebSocketConnectionRFC6455
public WebSocketConnectionRFC6455(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol,
List<Extension> extensions,
int draft)
throws IOException
- 抛出:
IOException
WebSocketConnectionRFC6455
public WebSocketConnectionRFC6455(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol,
List<Extension> extensions,
int draft,
MaskGen maskgen)
throws IOException
- 抛出:
IOException
getConnection
public WebSocket.Connection getConnection()
- 指定者:
- 接口
WebSocketConnection 中的 getConnection
getExtensions
public List<Extension> getExtensions()
- 指定者:
- 接口
WebSocketConnection 中的 getExtensions
handle
public Connection handle()
throws IOException
- 从接口
Connection 复制的描述
- Handle the connection.
- 指定者:
- 接口
Connection 中的 handle
- 返回:
- The Connection to use for the next handling of the connection.
This allows protocol upgrades and support for CONNECT.
- 抛出:
IOException - if the handling of I/O operations fail
onInputShutdown
public void onInputShutdown()
throws IOException
- 指定者:
- 接口
AsyncConnection 中的 onInputShutdown
- 抛出:
IOException
isIdle
public boolean isIdle()
- 指定者:
- 接口
Connection 中的 isIdle
- 返回:
- whether this connection is idle, that is not parsing and not generating
- 另请参见:
Connection.onIdleExpired(long)
onIdleExpired
public void onIdleExpired(long idleForMs)
- 从接口
Connection 复制的描述
- Called when the connection idle timeout expires
- 指定者:
- 接口
Connection 中的 onIdleExpired - 覆盖:
- 类
AbstractConnection 中的 onIdleExpired
- 参数:
idleForMs - how long the connection has been idle- 另请参见:
Connection.isIdle()
isSuspended
public boolean isSuspended()
- 从接口
Connection 复制的描述
The semantic of this method is to return true to indicate interest in further reads,
or false otherwise, but it is misnamed and should be really called isReadInterested().
- 指定者:
- 接口
Connection 中的 isSuspended
- 返回:
- true to indicate interest in further reads, false otherwise
onClose
public void onClose()
- 从接口
Connection 复制的描述
- Called after the connection is closed
- 指定者:
- 接口
Connection 中的 onClose
closeIn
public void closeIn(int code,
String message)
closeOut
public void closeOut(int code,
String message)
shutdown
public void shutdown()
- 指定者:
- 接口
WebSocketConnection 中的 shutdown
fillBuffersFrom
public void fillBuffersFrom(Buffer buffer)
- 指定者:
- 接口
WebSocketConnection 中的 fillBuffersFrom
onFrameHandshake
protected void onFrameHandshake()
onWebSocketOpen
protected void onWebSocketOpen()
hashKey
public static String hashKey(String key)
toString
public String toString()
- 覆盖:
- 类
AbstractConnection 中的 toString
Copyright © 2013. All Rights Reserved.