public class WebSocket00Channel extends WebSocketChannel
WebSocketChannel
which is used for WebSocketVersion.V00
WebSocketChannel.PartialFrame, WebSocketChannel.StreamSourceChannelControl
Constructor and Description |
---|
WebSocket00Channel(org.xnio.StreamConnection channel,
org.xnio.Pool<ByteBuffer> bufferPool,
String wsUrl,
Set<String> subProtocols,
boolean client)
Create a new
WebSocket00Channel |
Modifier and Type | Method and Description |
---|---|
protected StreamSinkFrameChannel |
createStreamSinkChannel(org.xnio.channels.StreamSinkChannel channel,
WebSocketFrameType type,
long payloadSize)
Create a new StreamSinkFrameChannel which can be used to send a WebSocket Frame of the type
WebSocketFrameType . |
protected WebSocketChannel.PartialFrame |
receiveFrame(WebSocketChannel.StreamSourceChannelControl streamSourceChannelControl)
Create a new
StreamSourceFrameChannel which can be used to read the data of the received WebSocket Frame |
areExtensionsSupported, close, getAttribute, getBufferPool, getCloseSetter, getDestinationAddress, getIdleTimeout, getIoThread, getLocalAddress, getLocalAddress, getOption, getPeerAddress, getPeerAddress, getReceiveSetter, getRequestScheme, getSourceAddress, getSubProtocols, getUrl, getVersion, getWorker, isClient, isCloseFrameReceived, isCloseFrameSent, isOpen, isSecure, receive, resumeReceives, send, sendClose, sendFragmentedBinary, sendFragmentedText, setAttribute, setIdleTimeout, setOption, supportsOption, suspendReceives
public WebSocket00Channel(org.xnio.StreamConnection channel, org.xnio.Pool<ByteBuffer> bufferPool, String wsUrl, Set<String> subProtocols, boolean client)
WebSocket00Channel
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 WebSocket00Channel
was created.protected WebSocketChannel.PartialFrame receiveFrame(WebSocketChannel.StreamSourceChannelControl streamSourceChannelControl)
WebSocketChannel
StreamSourceFrameChannel
which can be used to read the data of the received WebSocket FramereceiveFrame
in class WebSocketChannel
protected StreamSinkFrameChannel createStreamSinkChannel(org.xnio.channels.StreamSinkChannel channel, WebSocketFrameType type, long payloadSize)
WebSocketChannel
WebSocketFrameType
.createStreamSinkChannel
in class WebSocketChannel
channel
- The StreamSinkChannel
to wraptype
- 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.Copyright © 2013 JBoss by Red Hat. All rights reserved.