//
// cocos2d::extension::WebSocket::onSubThreadLoop from 0x5acbe8 to 0x5acc10 (40 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall cocos2d::extension::WebSocket::onSubThreadLoop(cocos2d::extension::WebSocket *this)
{
int v1; // r3
int v2; // r0
v1 = *((_DWORD *)this + 1);
v2 = *((_DWORD *)this + 7);
if ( (unsigned int)(v1 - 2) > 1 )
{
if ( v2 )
lws_service(v2, 0);
usleep(0xC350u);
return 0;
}
else
{
lws_context_destroy(v2);
return 1;
}
}