benilla-re systems structs docs

WowConnection::Send

function · net · primitive

Address
0x5b5630 · 1201 bytes, up to 0x5b5ae0
Signature
uint32_t __thiscall (WowConnection *this, CDataStore *msg, int32_t headroom)
Meaning
Frames a message, enciphers its header, sends it and queues what send did not take; returns 0 all sent, 1 part, 2 none
Confidence
verified, proof one
Finding
net/wire#size-header
Test
net::cipher_recv_roundtrip, net::cipher_send, net::header_send_inplace, net::header_send_node

Finding: Size header in net: the wire

A world packet starts with its size N, the count of opcode and body bytes, big-endian: two bytes, N >> 8 and N & 0xff, up to 32,767 (a signed compare); above that three, the low bytes of (N >> 16) | 0x80, N >> 8 and N. The first byte takes no mask: a size of 2^23 or more puts its bit 23 on the flag bit, already set, and drops bits 24 to 31: the header carries N modulo 2^23. A reader takes the form from the first byte's top bit and reads (b0 & 0x7f) << 16 | b1 << 8 | b2. The opcode goes out as four bytes little-endian and comes in as two.

The derivation is in the doc.

Callers 1

Callees 11

Calls and jumps by a bare address, from tables/calls.tsv.