mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-03-24 04:33:05 +08:00
waver : use 2 threads for file server
This commit is contained in:
@@ -438,13 +438,13 @@ void initMain() {
|
||||
g_isRunning = true;
|
||||
g_ggWave = GGWave_instance();
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
GGSock::FileServer::Parameters p;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
p.nWorkerThreads = 0;
|
||||
g_fileServer.init(p);
|
||||
#else
|
||||
g_fileServer.init({});
|
||||
p.nWorkerThreads = 2;
|
||||
#endif
|
||||
g_fileServer.init(p);
|
||||
|
||||
g_fileClient.setErrorCallback([](GGSock::Communicator::TErrorCode code) {
|
||||
printf("Disconnected with code = %d\n", code);
|
||||
|
||||
Reference in New Issue
Block a user