I try use https://github.com/emscripten-ports/SDL2_net in my crossplatform project wrriten in c++ but when I try open TCP socket by SDLNet_TCP_Open() then function return error "Couldn't connect to remote host" but server is okey, desktop and mobile clients works fine.
Firstly I test generated .js and .html by emscripten as local in browser with url C:/[PATH TO generated.html]/, but I thought that locally I don't have Permission ((as it is in the android, I have same error, then I wrote in manifest request for permission after...working )) but when I upload my client to http-server, error still exists.
Someone have any idea ?
EDIT. I try with -s USE_SDL_NET=2
Note
SDL_net has also been added to ports, use it with -s USE_SDL_NET=2. To see a list of all available ports, run emcc --show-ports.
from https://kripken.github.io/emscripten-site/docs/compiling/Building-Projects.html
but I got error:
WARNING:root:Assigning a non-existent settings attribute "USE_SDL_NET"
WARNING:root: - did you mean one of USE_SDL_TTF, USE_SDL, USE_SDL_IMAGE?
WARNING:root: - perhaps a typo in emcc's -s X=Y notation?
WARNING:root: - (see src/settings.js for valid values)
emcc --show-ports, return:
Available ports:
zlib (USE_ZLIB=1; zlib license)
libpng (USE_LIBPNG=1; zlib license)
SDL2 (USE_SDL=2; zlib license)
SDL2_image (USE_SDL_IMAGE=2; zlib license)
ogg (USE_OGG=1; zlib license)
vorbis (USE_VORBIS=1; zlib license)
bullet (USE_BULLET=1; zlib license)
freetype (USE_FREETYPE=1; freetype license)
SDL2_ttf (USE_SDL_TTF=2; zlib license)
EDIT2.
I download from https://github.com/jbaicoianu/emscripten/tree/c46b429ede3f5e015fe3e460867e225c3e45ae95
embuilder.py, sdl-net.py, __init__py and inject to my emscripten next, build process has successfully without upper mentioned problem. But main problem still exists... I've got "Couldn't connect to remote host" error.
Cheers, Luke