diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-08 11:05:45 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-08 11:05:45 -0800 |
commit | 828a7ec1348919be61e55c4d55c23b4a148072ac (patch) | |
tree | fc74f919523f6701950274fa5b4c4dbd39703d87 /system | |
parent | 2d164ea8392eef8f863639cc71cff59c8305fc18 (diff) |
refactor networking code to start supporting multiple backends
Diffstat (limited to 'system')
-rw-r--r-- | system/include/emscripten/emscripten.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 6b254ee6..93551f39 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -322,6 +322,17 @@ void emscripten_worker_respond(char *data, int size); int emscripten_get_worker_queue_size(worker_handle worker); /* + * Select the networking backend to use. By default emscripten's + * socket/networking implementation will use websockets, with this + * function you can change that to WebRTC. + * This function must be called before any network functions are + * called. + */ +#define EMSCRIPTEN_NETWORK_WEBSOCKETS 0 +#define EMSCRIPTEN_NETWORK_WEBRTC 1 +void emscripten_set_network_backend(int backend); + +/* * Profiling tools. * INIT must be called first, with the maximum identifier that * will be used. BEGIN will add some code that marks |