You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i first i looked at readme , i couldnt find the peace of code for the clients, to connect to the the tcp server ,
varModel=require('scuttlebutt/model');varnet=require('net');varm=newModel;vars=m.createStream();s.pipe(net.connect(8888,'localhost')).pipe(s);m.on('update',functioncb(key){// wait until we've gotten at least one count value from the networkif(key!=='count')return;m.removeListener('update',cb);setInterval(function(){m.set('count',Number(m.get('count'))+1);},100);});m.on('update',function(key,value){console.log(key+' = '+value);});
The text was updated successfully, but these errors were encountered:
yep , guess i just missed it .
thoguh i was looking for a server client exmpale,
i guess thats why i didnt notice , the connect example.
Great module, i enjoy.
I was looking for module like that for a while , now .
and i couldnt find it .
Julian Gruber told me about that module .
and thats exactly what i need
When i first i looked at readme , i couldnt find the peace of code for the clients, to connect to the the tcp server ,
The text was updated successfully, but these errors were encountered: