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
{{ message }}
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.
Hi,
I appreciate your clear documentation, its the primary reason I chose this library vs. others. I cant seem to get the close method to work though. Would you mind pointing out where I am going wrong? In the code below the close event never fires.
One other question I have is why the Client constructor requires the host and port but then I also have to set it on the client.
Thanks
Steve
varmemcache=require('memcache');varclient=newmemcache.Client('localhost',11211);client.port=11211;client.host='localhost';client.on('connect',function(){console.log('Connected');});client.on('close',function(){console.log('Disconnected');});client.on('timeout',function(){console.log('Timeout');});client.on('error',function(e){console.log(e);});// connect to the memcache server after subscribing to some or all of these eventsclient.connect()/*client.set('flags', 1, function(err, result){ if(err){ console.log(err); } else { console.log('Set: ' + result); }}, 1000);client.get('flags', function(err, result){ if(err){ console.log(err); } else { console.log('Get: ' + result); }});client.increment('flags', 1, function(err, result){ if(err){ console.log(err); } else { console.log('Increment: ' + result); }});client.get('flags', function(err, result){ if(err){ console.log(err); } else { console.log('Get: ' + result); }});client.delete('flags', function(err, result){ if(err){ console.log(err); } else { console.log('Delete: ' + result); }});*/client.close();
The text was updated successfully, but these errors were encountered:
Hi,
I appreciate your clear documentation, its the primary reason I chose this library vs. others. I cant seem to get the close method to work though. Would you mind pointing out where I am going wrong? In the code below the close event never fires.
One other question I have is why the Client constructor requires the host and port but then I also have to set it on the client.
Thanks
Steve
The text was updated successfully, but these errors were encountered: