|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.websocket.WebSocketConnectionD00
public class WebSocketConnectionD00
| 字段摘要 | |
|---|---|
static byte |
LENGTH_FRAME
|
static byte |
SENTINEL_FRAME
|
| 从类 org.eclipse.jetty.io.AbstractConnection 继承的字段 |
|---|
_endp |
| 构造方法摘要 | |
|---|---|
WebSocketConnectionD00(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol)
|
|
| 方法摘要 | |
|---|---|
byte |
binaryOpcode()
|
void |
close()
Close the connection with normal close code. |
void |
close(int code,
String message)
Close the connection with specific closeCode and message. |
byte |
continuationOpcode()
|
void |
disconnect()
|
static byte[] |
doTheHixieHixieShake(long key1,
long key2,
byte[] key3)
|
void |
fillBuffersFrom(Buffer buffer)
|
byte |
finMask()
|
WebSocket.Connection |
getConnection()
|
List<Extension> |
getExtensions()
|
int |
getMaxBinaryMessageSize()
Size in bytes of the maximum binary message to be received |
int |
getMaxIdleTime()
|
int |
getMaxTextMessageSize()
Size in characters of the maximum text message to be received |
String |
getProtocol()
|
Connection |
handle()
Handle the connection. |
boolean |
isAllowFrameFragmentation()
|
boolean |
isBinary(byte opcode)
|
boolean |
isClose(byte opcode)
|
boolean |
isContinuation(byte opcode)
|
boolean |
isControl(byte opcode)
|
boolean |
isIdle()
|
boolean |
isMessageComplete(byte flags)
|
boolean |
isMore(byte flags)
|
boolean |
isOpen()
|
boolean |
isPing(byte opcode)
|
boolean |
isPong(byte opcode)
|
boolean |
isSuspended()
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(). |
boolean |
isText(byte opcode)
|
void |
onClose()
Called after the connection is closed |
protected void |
onFrameHandshake()
|
void |
onInputShutdown()
|
protected void |
onWebsocketOpen()
|
void |
sendControl(byte code,
byte[] content,
int offset,
int length)
Send a control frame |
void |
sendFrame(byte flags,
byte opcode,
byte[] content,
int offset,
int length)
Send an arbitrary frame |
void |
sendMessage(byte[] data,
int offset,
int length)
|
void |
sendMessage(String content)
|
void |
setAllowFrameFragmentation(boolean allowFragmentation)
Set if frames larger than the frame buffer are handled with local fragmentations |
void |
setHixieKeys(String key1,
String key2)
|
void |
setMaxBinaryMessageSize(int size)
|
void |
setMaxIdleTime(int ms)
|
void |
setMaxTextMessageSize(int size)
|
void |
shutdown()
|
byte |
textOpcode()
|
| 从类 org.eclipse.jetty.io.AbstractConnection 继承的方法 |
|---|
getEndPoint, getTimeStamp, onIdleExpired, toString |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 从接口 org.eclipse.jetty.io.Connection 继承的方法 |
|---|
getTimeStamp, onIdleExpired |
| 字段详细信息 |
|---|
public static final byte LENGTH_FRAME
public static final byte SENTINEL_FRAME
| 构造方法详细信息 |
|---|
public WebSocketConnectionD00(WebSocket websocket,
EndPoint endpoint,
WebSocketBuffers buffers,
long timestamp,
int maxIdleTime,
String protocol)
throws IOException
IOException| 方法详细信息 |
|---|
public WebSocket.Connection getConnection()
WebSocketConnection 中的 getConnection
public void setHixieKeys(String key1,
String key2)
public Connection handle()
throws IOException
Connection 复制的描述
Connection 中的 handleIOException - if the handling of I/O operations fail
public void onInputShutdown()
throws IOException
AsyncConnection 中的 onInputShutdownIOExceptionpublic boolean isOpen()
WebSocket.Connection 中的 isOpenpublic boolean isIdle()
Connection 中的 isIdleConnection.onIdleExpired(long)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 中的 isSuspendedpublic void onClose()
Connection 复制的描述
Connection 中的 onClose
public void sendMessage(String content)
throws IOException
WebSocket.Connection 中的 sendMessageIOException
public void sendMessage(byte[] data,
int offset,
int length)
throws IOException
WebSocket.Connection 中的 sendMessageIOExceptionpublic boolean isMore(byte flags)
public void sendControl(byte code,
byte[] content,
int offset,
int length)
throws IOException
WebSocket.FrameConnection 中的 sendControlIOException
public void sendFrame(byte flags,
byte opcode,
byte[] content,
int offset,
int length)
throws IOException
WebSocket.FrameConnection 复制的描述
WebSocket.FrameConnection 中的 sendFrameIOException
public void close(int code,
String message)
WebSocket.Connection 复制的描述
WebSocket.Connection 中的 closecode - The close code to send, or -1 for no close codemessage - The message to send or null for no messagepublic void disconnect()
WebSocket.Connection 中的 disconnectpublic void close()
WebSocket.Connection 复制的描述
WebSocket.Connection 中的 closepublic void shutdown()
WebSocketConnection 中的 shutdownpublic void fillBuffersFrom(Buffer buffer)
WebSocketConnection 中的 fillBuffersFrom
public static byte[] doTheHixieHixieShake(long key1,
long key2,
byte[] key3)
public void setMaxTextMessageSize(int size)
WebSocket.Connection 中的 setMaxTextMessageSizesize - size<0 No aggregation of frames to messages, >=0 max size of text frame aggregation buffer in characterspublic void setMaxIdleTime(int ms)
WebSocket.Connection 中的 setMaxIdleTimems - The time in ms that the connection can be idle before closingpublic void setMaxBinaryMessageSize(int size)
WebSocket.Connection 中的 setMaxBinaryMessageSizesize - size<0 no aggregation of binary frames, >=0 size of binary frame aggregation bufferpublic int getMaxTextMessageSize()
WebSocket.Connection 复制的描述
WebSocket.Connection 中的 getMaxTextMessageSizepublic int getMaxIdleTime()
WebSocket.Connection 中的 getMaxIdleTimepublic int getMaxBinaryMessageSize()
WebSocket.Connection 复制的描述
WebSocket.Connection 中的 getMaxBinaryMessageSizepublic String getProtocol()
WebSocket.Connection 中的 getProtocolprotected void onFrameHandshake()
protected void onWebsocketOpen()
public boolean isMessageComplete(byte flags)
WebSocket.FrameConnection 中的 isMessageCompleteflags - The flags bytes of a frame
public byte binaryOpcode()
WebSocket.FrameConnection 中的 binaryOpcodepublic byte textOpcode()
WebSocket.FrameConnection 中的 textOpcodepublic boolean isControl(byte opcode)
WebSocket.FrameConnection 中的 isControlpublic boolean isText(byte opcode)
WebSocket.FrameConnection 中的 isTextpublic boolean isBinary(byte opcode)
WebSocket.FrameConnection 中的 isBinarypublic boolean isContinuation(byte opcode)
WebSocket.FrameConnection 中的 isContinuationpublic boolean isClose(byte opcode)
WebSocket.FrameConnection 中的 isClosepublic boolean isPing(byte opcode)
WebSocket.FrameConnection 中的 isPingpublic boolean isPong(byte opcode)
WebSocket.FrameConnection 中的 isPongpublic List<Extension> getExtensions()
WebSocketConnection 中的 getExtensionspublic byte continuationOpcode()
WebSocket.FrameConnection 中的 continuationOpcodepublic byte finMask()
WebSocket.FrameConnection 中的 finMaskpublic void setAllowFrameFragmentation(boolean allowFragmentation)
WebSocket.FrameConnection 复制的描述
WebSocket.FrameConnection 中的 setAllowFrameFragmentationpublic boolean isAllowFrameFragmentation()
WebSocket.FrameConnection 中的 isAllowFrameFragmentation
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||