CBlockingUDPSocket::WaitForMessage
0x000bb2e0 · 177 bytes · __thiscall
_ZN18CBlockingUDPSocket14WaitForMessageEf
Decompiled
undefined (2 params)
/* CBlockingUDPSocket::WaitForMessage(float) */
uint __thiscall CBlockingUDPSocket::WaitForMessage(CBlockingUDPSocket *this,float param_1)
{
uint *puVar1;
int iVar2;
undefined4 *puVar3;
timeval local_14;
puVar3 = (undefined4 *)(*(int *)(this + 4) + 0x10);
for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {
*puVar3 = 0;
puVar3 = puVar3 + 1;
}
puVar1 = (uint *)(*(int *)(this + 4) + 0x10 + (*(uint *)(this + 0x14) >> 5) * 4);
*puVar1 = *puVar1 | 1 << ((byte)*(uint *)(this + 0x14) & 0x1f);
local_14.tv_sec = (__time_t)param_1;
local_14.tv_usec = (__suseconds_t)((param_1 - (float)local_14.tv_sec) * 1e+06 + 0.5);
iVar2 = select(*(int *)(this + 0x14) + 1,(fd_set *)(*(int *)(this + 4) + 0x10),(fd_set *)0x0,
(fd_set *)0x0,&local_14);
if (iVar2 != -1) {
return *(int *)(*(int *)(this + 4) + 0x10 + (*(uint *)(this + 0x14) >> 5) * 4) >>
((byte)*(uint *)(this + 0x14) & 0x1f) & 1;
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.