CNetChan::SendReliableViaStream
0x001b18e0 · 329 bytes · __thiscall
_ZN8CNetChan21SendReliableViaStreamEPNS_15dataFragments_sE
Decompiled
undefined (2 params)
/* CNetChan::SendReliableViaStream(CNetChan::dataFragments_s*) */
bool __thiscall CNetChan::SendReliableViaStream(CNetChan *this,dataFragments_s *param_1)
{
undefined4 uVar1;
undefined4 uVar2;
undefined4 uVar3;
int iVar4;
int in_GS_OFFSET;
char *local_58 [3];
int local_4c;
undefined1 local_40 [32];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
bf_write::bf_write((bf_write *)local_58,"outDataHeader",local_40,0x20,-1);
*(undefined4 *)(param_1 + 0x114) = *(undefined4 *)(this + 8);
*(undefined4 *)(param_1 + 300) = *(undefined4 *)(param_1 + 0x124);
bf_write::WriteByte((bf_write *)local_58,2);
bf_write::WriteWord((bf_write *)local_58,*(uint *)(param_1 + 0x10c));
bf_write::WriteLong((bf_write *)local_58,*(long *)(param_1 + 0x114));
if (*(int *)(net_showtcp._28_4_ + 0x30) != 0) {
uVar1 = *(undefined4 *)(this + 8);
uVar2 = *(undefined4 *)(param_1 + 0x10c);
uVar3 = netadr_s::ToString((netadr_s *)(this + 0x98),false);
ConMsg("TCP -> %s: sz=%i seq=%i\n",uVar3,uVar2,uVar1);
}
NET_SendStream(*(int *)(this + 0x90),local_58[0],local_4c + 7 >> 3,0);
iVar4 = NET_SendStream(*(int *)(this + 0x90),*(char **)(param_1 + 0x108),*(int *)(param_1 + 0x10c)
,0);
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar4 != -1;
}
/* 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.