Skip to content

kcp2k::Utils

Public Functions

Name
unsafe bool SegmentsEqual(ArraySegment< byte > a, ArraySegment< byte > b)
int Encode8u(byte [] p, int offset, byte c)
int Decode8u(byte [] p, int offset, ref byte c)
int Encode16U(byte [] p, int offset, ushort w)
int Decode16U(byte [] p, int offset, ref ushort c)
int Encode32U(byte [] p, int offset, uint l)
int Decode32U(byte [] p, int offset, ref uint c)
int TimeDiff(uint later, uint earlier)

Public Functions Documentation

function SegmentsEqual

static inline unsafe bool SegmentsEqual(
    ArraySegment< byte > a,
    ArraySegment< byte > b
)

function Encode8u

static inline int Encode8u(
    byte [] p,
    int offset,
    byte c
)

function Decode8u

static inline int Decode8u(
    byte [] p,
    int offset,
    ref byte c
)

function Encode16U

static inline int Encode16U(
    byte [] p,
    int offset,
    ushort w
)

function Decode16U

static inline int Decode16U(
    byte [] p,
    int offset,
    ref ushort c
)

function Encode32U

static inline int Encode32U(
    byte [] p,
    int offset,
    uint l
)

function Decode32U

static inline int Decode32U(
    byte [] p,
    int offset,
    ref uint c
)

function TimeDiff

static inline int TimeDiff(
    uint later,
    uint earlier
)

Updated on 25 January 2021 at 01:28:49 UTC