CSocketCreator::CloseAcceptedSocket
0x0028c3f0 · 151 bytes · __thiscall
_ZN14CSocketCreator19CloseAcceptedSocketEi
Decompiled
undefined (2 params)
/* CSocketCreator::CloseAcceptedSocket(int) */
void __thiscall CSocketCreator::CloseAcceptedSocket(CSocketCreator *this,int param_1)
{
int *piVar1;
int *piVar2;
int iVar3;
int iVar4;
int iVar5;
if (param_1 < *(int *)(this + 0x10)) {
piVar1 = *(int **)this;
iVar5 = param_1 * 0x14;
piVar2 = (int *)(*(int *)(this + 4) + iVar5);
if (piVar1 != (int *)0x0) {
(**(code **)(*piVar1 + 8))(piVar1,*piVar2,piVar2 + 1,piVar2[4]);
}
close(*piVar2);
iVar3 = *(int *)(this + 0x10);
iVar4 = (iVar3 - param_1) + -1;
if (0 < iVar4) {
_V_memmove((void *)(iVar5 + *(int *)(this + 4)),(void *)(*(int *)(this + 4) + 0x14 + iVar5),
iVar4 * 0x14);
iVar3 = *(int *)(this + 0x10);
}
*(int *)(this + 0x10) = iVar3 + -1;
}
return;
}
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.