CBlockingUDPSocket::CreateSocket
0x000bb1e0 · 139 bytes · __thiscall
_ZN18CBlockingUDPSocket12CreateSocketEv
Decompiled
undefined (1 param)
/* CBlockingUDPSocket::CreateSocket() */
bool __thiscall CBlockingUDPSocket::CreateSocket(CBlockingUDPSocket *this)
{
undefined4 *puVar1;
int iVar2;
int in_GS_OFFSET;
bool bVar3;
sockaddr local_20;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = socket(2,2,0x11);
*(int *)(this + 0x14) = iVar2;
bVar3 = false;
if (iVar2 != -1) {
puVar1 = *(undefined4 **)(this + 4);
local_20._0_4_ = *puVar1;
local_20.sa_data._2_4_ = puVar1[1];
local_20.sa_data._6_4_ = puVar1[2];
local_20.sa_data._10_4_ = puVar1[3];
iVar2 = bind(iVar2,&local_20,0x10);
bVar3 = iVar2 != -1;
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return bVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.