Created
April 26, 2015 04:21
-
-
Save JoshuaGross/7c2569935cb6e7aecc45 to your computer and use it in GitHub Desktop.
Test an echo server on the command-line with node
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
node -e "var client; (client = new require('net').Socket()).connect(7000, \"0.0.0.0\", function () { console.log(\"connected\"); client.on(\"data\", function (data) { console.log(\"Received:\" + data); client.destroy(); }); client.write(\"holla\"); });" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment