Improve networking usage
This commit is contained in:
parent
a02860808d
commit
ecf2931aad
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue
Block a user