-
-
Save ihgrant/3d316140fb03e4727accc737be47a79f to your computer and use it in GitHub Desktop.
Passing WebSocket Instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const server = new WebSocket("ws://localhost:3000"); | |
export default const server = { | |
sendmessage: () => { | |
return server.onmessage = () => {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment