//
// cocos2d::extension::WebSocket::onSubThreadLoop from 0xaad838 to 0xaad880 (72 bytes)
//
// 2 xrefs:
// > ??> @ 0xb1738
// > ??> @ 0x11fafa8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::extension::WebSocket::onSubThreadLoop(cocos2d::extension::WebSocket *this)
{
int v1; // w1
__int64 v2; // x0
v1 = *((_DWORD *)this + 2);
v2 = *((_QWORD *)this + 7);
if ( (unsigned int)(v1 - 2) <= 1 )
{
lws_context_destroy(v2);
return 1;
}
else
{
if ( v2 )
lws_service(v2, 0);
usleep(0xC350u);
return 0;
}
}