switch cocos2d-x main thread

switch cocos2d-x main thread
0.0 0


Hi all. I am new to cocos2d-x and doesn’t know much about the cocos2d-x architecture.
I am making multiplayer game and listening to non-blocking socket in a separate pthread(lets say thread sock_thread).
But once the game loop starts its doesn’t goes to that sock_thread. How can I yield or sleep the main thread?