Js5GroupResponse

class Js5GroupResponse(val response: Js5GroupResponse.Js5GroupResponseType) : OutgoingJs5Message

Js5 group responses are used to feed the cache to the client through the server.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
class Js5ByteBufGroupResponse(buffer: ByteBuf, val offset: Int, val limit: Int) : DefaultByteBufHolder, Js5GroupResponse.Js5GroupResponseType

A prepared ByteBuf based JS5 group response. The byte buffer here is in the exact format that the client expects, starting with the archive and group id, with the blocks separated by 0xFF terminators. This implementation does support XOR encryption.

Link copied to clipboard

A prepared JS5 file-based group response. This response will make use of Netty's FileRegion implementation, allowing for zero-copy responses. This implementation is ideal for development purposes, as it avoids needing to load up the entire JS5 cache into memory. It is however not the best for production, as it is heavily bottlenecked by disk seek and read speeds. In-memory implementations will likely outperform, even if they do need to perform a copy. Furthermore, this implementation is not supported with IOUring sockets, nor does it support XOR encryption.

Link copied to clipboard
sealed interface Js5GroupResponseType

A common binding interface for all the possible JS5 group responses.

Properties

Link copied to clipboard

the type of the response that is being encoded.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String