Skip to content

Instantly share code, notes, and snippets.

@Milek7

Milek7/ems.diff Secret

Created December 9, 2020 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Milek7/5b8c9f61fec5e28a2e249269b654b93d to your computer and use it in GitHub Desktop.
Save Milek7/5b8c9f61fec5e28a2e249269b654b93d to your computer and use it in GitHub Desktop.
diff --git a/src/library_sockfs.js b/src/library_sockfs.js
index 86f8605..a512b4d 100644
--- a/src/library_sockfs.js
+++ b/src/library_sockfs.js
@@ -180,6 +180,9 @@ mergeInto(LibraryManager.library, {
if ('string' === typeof Module['websocket']['url']) {
url = Module['websocket']['url']; // Fetch runtime WebSocket URL config.
}
+ if ('function' === typeof Module['websocket']['url']) {
+ url = Module['websocket']['url'](addr, port); // Fetch runtime WebSocket URL config.
+ }
}
if (url === 'ws://' || url === 'wss://') { // Is the supplied URL config just a prefix, if so complete it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment