Improve networking usage

This commit is contained in:
Kagami Hiiragi 2015-02-24 20:27:41 +03:00
parent a02860808d
commit ecf2931aad
2 changed files with 4 additions and 4 deletions

View File

@ -145,8 +145,8 @@ tcp.bootstrap().then(function(nodes) {
tcp.connect(remotePort, remoteHost);
});
tcp.on("established", function() {
console.log("Connection established");
tcp.on("established", function(version) {
console.log("Connection established to", version.userAgent);
tcp.on("message", function(command, payload) {
console.log("Got new", command, "message");

View File

@ -18,8 +18,8 @@
* tcp.connect(remotePort, remoteHost);
* });
*
* tcp.on("established", function() {
* console.log("Connection established");
* tcp.on("established", function(version) {
* console.log("Connection established to", version.userAgent);
*
* tcp.on("message", function(command, payload) {
* console.log("Got new", command, "message");