npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

memcache-server-stream

1.0.0

@soldair

npmHomeRepoSnykSocket
Downloads:3
$ npm install memcache-server-stream
DailyWeeklyMonthlyYearly

Build Status

#memcache-server-stream

memcache server protocol implemented on top of a duplex stream. add memcache protocol support to any node net.Server

##examples

as a stream just pipe!


var mc = require('memcache-server-stream');

con.pipe(mc()).pipe(con);

for a simple server you can just use



var mc = require('memcache-server-stream');

var server = mc.server()

server.listen(11200,function(){
  console.log('ready for connections from memcache clients');
})


##api

mc = exports function(cache object [optional])

  • duplex stream ready for reading an writing memcache protocol

mc.server(cache object [optional])

  • handy dandy pre-made net server setup to handle all connections

mc.mc(cache object [optional])

  • factory for underlying protocol implementation

mc.mc.Mc

  • contructor for underlying protocol implementation

"cache object"

  • defaults to issacs lru-cache module
  • must support sync get/set as functions at this time.