L L4D2node

CRConServer::BCloseAcceptedSocket

0x0020b040 · 97 bytes · __thiscall

_ZN11CRConServer20BCloseAcceptedSocketEj

Decompiled

undefined (2 params)

/* CRConServer::BCloseAcceptedSocket(unsigned int) */

undefined4 __thiscall CRConServer::BCloseAcceptedSocket(CRConServer *this,uint param_1)

{
  CSocketCreator *this_00;
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar3 = 0;
  this_00 = (CSocketCreator *)(this + 4);
  iVar1 = CSocketCreator::GetAcceptedSocketCount(this_00);
  if (0 < iVar1) {
    do {
      iVar2 = CSocketCreator::GetAcceptedSocketData(this_00,iVar3);
      if (*(uint *)(iVar2 + 8) == param_1) {
        CSocketCreator::CloseAcceptedSocket(this_00,iVar3);
        return 1;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != iVar1);
  }
  return 0;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)