Last active
July 28, 2016 13:37
-
-
Save littlepsylo/341ed91aed9870924de082d9d1eee580 to your computer and use it in GitHub Desktop.
Using WebSocket in react-native with a socket.io server
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
const io = new WebSocket('ws://yourdomain:port/socket.io/?transport=websocket') | |
io.onclose = e => console.log('onclose', e.code, e.reason) | |
io.onerror = e => console.log('onerror', e.message) | |
io.onopen = () => console.log('connected !') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment