//
// cocos2d::extension::WebSocket::close from 0x5ad1d8 to 0x5ad20e (54 bytes)
//
// 1 xrefs:
// > cocos2d::extension::WebSocket::~WebSocket @ 0x5ad21e
//
// 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
//
void __fastcall cocos2d::extension::WebSocket::close(cocos2d::CCObject **this)
{
cocos2d::CCDirector *v2; // r0
cocos2d::CCScheduler *v3; // r0
void *v4; // r1
pthread_t *v5; // r0
v2 = cocos2d::CCDirector::sharedDirector();
v3 = v2->getScheduler(v2);
cocos2d::CCScheduler::unscheduleAllForTarget(v3, *(this + 5));
if ( (unsigned int)&(*(this + 1))[-1].m_unknown5 + 2 > 1 )
{
v5 = (pthread_t *)*(this + 5);
*(this + 1) = (cocos2d::CCObject *)(&dword_0 + 3);
cocos2d::extension::WsThreadHelper::joinSubThread(v5, v4);
(*(this + 8))->acceptVisitor(*(this + 8), (cocos2d::CCDataVisitor *)this);
}
}