FNboSerializeToBuffer

Serializes data in network byte order form into a buffer

Windows
MacOS
Linux

References

Module

OnlineSubsystem

Header

/Engine/Plugins/Online/OnlineSubsystem/Source/Public/NboSerializer.h

Include

#include "NboSerializer.h"

Syntax

class FNboSerializeToBuffer

Remarks

Serializes data in network byte order form into a buffer

Hack because our build process doesn't handle plugin dependencies correctly. This will be removed Serializes data in network byte order form into a buffer

Variables

Name Description

Protected variable

bool

 

bHasOverflowed

Indicates whether writing to the buffer caused an overflow or not

Protected variable

TArray< uint8 >

 

Data

Holds the data as it is serialized

Protected variable

uint32

 

NumBytes

Tracks how many bytes have been written in the packet

Constructors

Name Description

Public function

FNboSerializeToBuffer

(
    uint32 Size
)

Inits the write tracking

Public function

FNboSerializeToBuffer

(
    uint32 Size
)

Inits the write tracking

Functions

Name Description

Public function

FNboSerializ...

 

AddString

(
    const ANSICHAR* String,
    const int32 Length
)

Adds a substring to the buffer

Public function

FNboSerializ...

 

AddString

(
    const ANSICHAR* String,
    const int32 Length
)

Adds a substring to the buffer

Public function Const

const TArray...

 

GetBuffer()

Cast operator to get at the formatted buffer data

Public function Const

const TArray...

 

GetBuffer()

Cast operator to get at the formatted buffer data

Public function Const

uint32

 

GetBufferSize()

Returns the number of bytes preallocated in the array

Public function Const

uint32

 

GetBufferSize()

Returns the number of bytes preallocated in the array

Public function Const

uint32

 

GetByteCount()

Returns the size of the buffer we've built up

Public function Const

uint32

 

GetByteCount()

Returns the size of the buffer we've built up

Public function

uint8 *

 

GetRawBuffer

(
    uint32 Offset
)

Gets the buffer at a specific point

Public function

uint8 *

 

GetRawBuffer

(
    uint32 Offset
)

Gets the buffer at a specific point

Public function Const

bool

 

HasOverflow()

Returns whether the buffer had an overflow when writing to it

Public function Const

bool

 

HasOverflow()

Returns whether the buffer had an overflow when writing to it

Public function

void

 

Reset()

Act as if the buffer is now empty. Useful for buffers that are reused

Public function

void

 

Reset()

Act as if the buffer is now empty. Useful for buffers that are reused

Public function

void

 

SkipAheadBy

(
    uint32 Amount
)

Skips forward in the buffer by the specified amount

Public function

void

 

SkipAheadBy

(
    uint32 Amount
)

Skips forward in the buffer by the specified amount

Public function

void

 

TrimBuffer()

Trim any extra space in the buffer that is not used

Public function

void

 

TrimBuffer()

Trim any extra space in the buffer that is not used

Public function

void

 

WriteBinary

(
    const uint8* Buffer,
    uint32 NumToWrite
)

Writes a blob of data to the buffer

Public function

void

 

WriteBinary

(
    const uint8* Buffer,
    uint32 NumToWrite
)

Writes a blob of data to the buffer

Operators

Name Description

Public function Const

 

operator uint8 *()

Cast operator to get at the formatted buffer data

Public function Const

 

operator uint8 *()

Cast operator to get at the formatted buffer data

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss