Module io.netty5.codec.http
Class BinaryWebSocketFrame
- java.lang.Object
-
- io.netty5.buffer.api.BufferHolder<WebSocketFrame>
-
- io.netty5.handler.codec.http.websocketx.WebSocketFrame
-
- io.netty5.handler.codec.http.websocketx.BinaryWebSocketFrame
-
- All Implemented Interfaces:
Resource<WebSocketFrame>
,AutoCloseable
public class BinaryWebSocketFrame extends WebSocketFrame
Web Socket frame containing binary data.
-
-
Constructor Summary
Constructors Constructor Description BinaryWebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)
Creates a new binary frame with the specified binary data and the final fragment flag.BinaryWebSocketFrame(Buffer binaryData)
Creates a new binary frame with the specified binary data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected WebSocketFrame
receive(Buffer buf)
Called when a sentBufferHolder
is received by the recipient.-
Methods inherited from class io.netty5.handler.codec.http.websocketx.WebSocketFrame
binaryData, isFinalFragment, rsv, toString
-
Methods inherited from class io.netty5.buffer.api.BufferHolder
close, equals, getBuffer, getBufferVolatile, hashCode, isAccessible, replaceBuffer, replaceBufferVolatile, send, touch
-
-
-
-
Constructor Detail
-
BinaryWebSocketFrame
public BinaryWebSocketFrame(Buffer binaryData)
Creates a new binary frame with the specified binary data. The final fragment flag is set to true.- Parameters:
binaryData
- the content of the frame.
-
BinaryWebSocketFrame
public BinaryWebSocketFrame(boolean finalFragment, int rsv, Buffer binaryData)
Creates a new binary frame with the specified binary data and the final fragment flag.- Parameters:
finalFragment
- flag indicating if this frame is the final fragmentrsv
- reserved bits used for protocol extensionsbinaryData
- the content of the frame.
-
-
Method Detail
-
receive
protected WebSocketFrame receive(Buffer buf)
Description copied from class:BufferHolder
Called when a sentBufferHolder
is received by the recipient. TheBufferHolder
should return a new concrete instance, that wraps the givenBuffer
object.- Specified by:
receive
in classBufferHolder<WebSocketFrame>
- Parameters:
buf
- TheBuffer
that is received by the recipient, and needs to be wrapped in a newBufferHolder
instance.- Returns:
- A new buffer holder instance, containing the given buffer.
-
-