facebookarchive / RakNet

RakNet is a cross platform, open source, C++ networking engine for game programmers.
Other
3.3k stars 1.02k forks source link

Startup creates more than one thread to handle recv data #74

Open Kiddinglife opened 8 years ago

Kiddinglife commented 8 years ago

In RakPeer.cpp at line 417 - 423

if !defined(native_client) && !defined(WINDOWS_STORE_RT)

for( i = 0; i < socketDescriptorCount; i++ )
{
    if( socketList[i]->IsBerkleySocket() )
        ( (RNS2_Berkley*) socketList[i] )->CreateRecvPollingThread(threadPriority);
}

endif

if the number of bound sockets are greater than 1, mroe than one thread will be created to handle recv data. However, as the document says, raknet only support one-thread-send and one-thread-recv.