Top Description Fields Constructors Methods
io.rsocket.frame

public Class FrameLengthCodec

extends Object
Class Inheritance
Imports
io.netty.buffer.ByteBuf, .ByteBufAllocator

Some transports like TCP aren't framed, and require a length. This is used by DuplexConnections for transports that need to send length

Field Summary

Modifier and TypeField and Description
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static int
decodeLength(final ByteBuf byteBuf)

public static ByteBuf
encode(ByteBufAllocator allocator, int length, ByteBuf frame)

private static void
encodeLength(final ByteBuf byteBuf, final int length)

public static ByteBuf
frame(ByteBuf byteBuf)

public static int
length(ByteBuf byteBuf)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FRAME_LENGTH_MASKback to summary
public static final int FRAME_LENGTH_MASK
FRAME_LENGTH_SIZEback to summary
public static final int FRAME_LENGTH_SIZE

Constructor Detail

FrameLengthCodecback to summary
private FrameLengthCodec()

Method Detail

decodeLengthback to summary
private static int decodeLength(final ByteBuf byteBuf)
encodeback to summary
public static ByteBuf encode(ByteBufAllocator allocator, int length, ByteBuf frame)
encodeLengthback to summary
private static void encodeLength(final ByteBuf byteBuf, final int length)
frameback to summary
public static ByteBuf frame(ByteBuf byteBuf)
lengthback to summary
public static int length(ByteBuf byteBuf)