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
var net = require("net") | |
, fs = require("fs") | |
, filename = "messages.txt"; | |
var server = net.createServer(function(socket) { | |
console.log("== Client connected"); | |
socket.on("data", function(data) { | |
console.log("Client sent:", data.toString()); | |
socket.write("Your message has sent to the server!\n"); |
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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package myservice; | |
/** | |
* | |
* @author vcamaral | |
*/ |