public class WebSocket07Channel extends WebSocketChannel
WebSocketChannel which is used for WebSocketVersion.V08WebSocketChannel.PartialFrame| Modifier and Type | Field and Description |
|---|---|
protected static byte |
OPCODE_BINARY |
protected static byte |
OPCODE_CLOSE |
protected static byte |
OPCODE_CONT |
protected static byte |
OPCODE_PING |
protected static byte |
OPCODE_PONG |
protected static byte |
OPCODE_TEXT |
fragmentedChannel| Constructor and Description |
|---|
WebSocket07Channel(org.xnio.StreamConnection channel,
org.xnio.Pool<ByteBuffer> bufferPool,
String wsUrl,
String subProtocol,
boolean client,
boolean allowExtensions)
Create a new
WebSocket07Channel |
| Modifier and Type | Method and Description |
|---|---|
protected StreamSinkFrameChannel |
createStreamSinkChannel(WebSocketFrameType type,
long payloadSize)
Create a new StreamSinkFrameChannel which can be used to send a WebSocket Frame of the type
WebSocketFrameType. |
protected void |
markReadsBroken(Throwable cause)
Called when a source sub channel fails to fulfil its contract, and leaves the channel in an inconsistent state.
|
protected WebSocketChannel.PartialFrame |
receiveFrame()
Create a new
StreamSourceFrameChannel which can be used to read the data of the received Frame |
areExtensionsSupported, createChannel, getAttribute, getDestinationAddress, getFramePriority, getRequestScheme, getSourceAddress, getSubProtocol, getSubProtocols, getUrl, getVersion, handleBrokenSinkChannel, handleBrokenSourceChannel, isClient, isCloseFrameReceived, isCloseFrameSent, isLastFrameReceived, isLastFrameSent, isReadsBroken, isSecure, parseFrame, send, send, sendClose, setAttributeclose, flushSenders, getBufferPool, getCloseSetter, getIdleTimeout, getIoThread, getLocalAddress, getLocalAddress, getOption, getPeerAddress, getPeerAddress, getReceiveSetter, getWorker, isOpen, isReceivesResumed, isWritesBroken, markWritesBroken, queueFrame, receive, resumeReceives, setIdleTimeout, setOption, supportsOption, suspendReceives, toStringprotected static final byte OPCODE_CONT
protected static final byte OPCODE_TEXT
protected static final byte OPCODE_BINARY
protected static final byte OPCODE_CLOSE
protected static final byte OPCODE_PING
protected static final byte OPCODE_PONG
public WebSocket07Channel(org.xnio.StreamConnection channel,
org.xnio.Pool<ByteBuffer> bufferPool,
String wsUrl,
String subProtocol,
boolean client,
boolean allowExtensions)
WebSocket07Channelchannel - The StreamConnection over which the WebSocket Frames should get send and received.
Be aware that it already must be "upgraded".bufferPool - The Pool which will be used to acquire ByteBuffer's from.wsUrl - The url for which the WebSocket07Channel was created.protected WebSocketChannel.PartialFrame receiveFrame()
WebSocketChannelStreamSourceFrameChannel which can be used to read the data of the received FramereceiveFrame in class WebSocketChannelStreamSourceFrameChannel will be used to read a Frame from.
This will return null if the right StreamSourceFrameChannel could not be detected with the given
buffer and so more data is needed.protected void markReadsBroken(Throwable cause)
AbstractFramedChannelmarkReadsBroken in class WebSocketChannelcause - The possibly null causeprotected StreamSinkFrameChannel createStreamSinkChannel(WebSocketFrameType type, long payloadSize)
WebSocketChannelWebSocketFrameType.createStreamSinkChannel in class WebSocketChanneltype - The WebSocketFrameType of the WebSocketFrame which will be send over this StreamSinkFrameChannelpayloadSize - The size of the payload to transmit. May be 0 if non payload at all should be included, or -1 if unknownCopyright © 2014 JBoss by Red Hat. All rights reserved.