I’m coding network for cocos2d-x game on WP8 and have to use ‘htonl, htons’ in winsock2 header to handle Read/Write buffer. But it caused error ‘timeval’ : struct type redefinition in CCStdC.h when i included winsock2 . I found many topics on Google but not really work. Please help!