Last active
May 3, 2016 21:49
-
-
Save sethdorris/b85d0bf47da1f11c9b0d851465a402c3 to your computer and use it in GitHub Desktop.
Passing WebSocket Instance
This file contains 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
export default const server = { | |
server: null, | |
getServer: return this.server, | |
create: () => { | |
const server = new WebSocket("ws://localhost:3000"); | |
this.server = server | |
}, | |
sendmessage: () => { | |
return server.onmessage = ()=> {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment