Last active
September 27, 2019 17:16
-
-
Save pwener/74c83edc2f594c05af27c54addb76677 to your computer and use it in GitHub Desktop.
Trying to connect to zrp socket
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 net = require('net'); | |
| const client = new net.Socket(); | |
| client.connect(80, 'zrp-challenge-socket.herokuapp.com', () => { | |
| console.log('Connected...'); | |
| }); | |
| client.on('ocurrence', (data) => console.log('Received: ' + data)); | |
| client.on('data', (otherData) => console.info(otherData)); | |
| client.on('timeout', () => console.info('Timeout...')); | |
| client.on('error', (err) => { | |
| console.log(err); | |
| }) | |
| client.on('close', () => console.log('Connection closed')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment