Table of Contents

Class NamingBatchRequest

Namespace
FishMMO.Server.Core.World.SceneServer
Assembly
FishMMO.Server.dll

Reads the IDs out of a batched name request. Pure.

public static class NamingBatchRequest
Inheritance
NamingBatchRequest
Inherited Members

Methods

SelectIds(long[], int, HashSet<long>, List<long>)

The distinct positive IDs among the first limit entries, in order.

public static int SelectIds(long[] ids, int limit, HashSet<long> seen, List<long> into)

Parameters

ids long[]

The request's IDs. Null reads as empty.

limit int

How many leading entries to read.

seen HashSet<long>

Scratch set. Cleared here.

into List<long>

Receives the IDs. Not cleared first.

Returns

int

The number of IDs added.

Remarks

limit is what the request was admitted for: the message's own cap, and then the connection's budget, are both charged per entry before anything is read, so an entry past the limit is not looked at at all. A repeated ID is charged and not looked up twice; an honest client never repeats one.