refactor, test memcached protocol