public class WebSocket07Channel extends WebSocketChannel
WebSocketChannel
which is used for WebSocketVersion.V08
WebSocketChannel.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, setAttribute
close, flushSenders, getBufferPool, getCloseSetter, getIdleTimeout, getIoThread, getLocalAddress, getLocalAddress, getOption, getPeerAddress, getPeerAddress, getReceiveSetter, getWorker, isOpen, isReceivesResumed, isWritesBroken, markWritesBroken, queueFrame, receive, resumeReceives, setIdleTimeout, setOption, supportsOption, suspendReceives, toString
protected 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)
WebSocket07Channel
channel
- 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()
WebSocketChannel
StreamSourceFrameChannel
which can be used to read the data of the received FramereceiveFrame
in class WebSocketChannel
StreamSourceFrameChannel
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)
AbstractFramedChannel
markReadsBroken
in class WebSocketChannel
cause
- The possibly null causeprotected StreamSinkFrameChannel createStreamSinkChannel(WebSocketFrameType type, long payloadSize)
WebSocketChannel
WebSocketFrameType
.createStreamSinkChannel
in class WebSocketChannel
type
- The WebSocketFrameType
of the WebSocketFrame which will be send over this StreamSinkFrameChannel
payloadSize
- 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.