Node Server Memcached Protocol
for logging users in and out of the server.
-------------------------------------------
add <username> <!ignore flags> <!ignore exptime> <bytes> [!ignore noreply]\r\n
- <username> is the username of the new user
- <flags> and <exptime> are ignored.
- <bytes> is the number of bytes in the data block to follow, *not*
including the delimiting \r\n. <bytes> may *not* be zero.
After this line, the client sends the JSON-encoded data block:
<data block>\r\n
- <data block> is JSON-encoded information about the user, having a length
of <bytes> bytes.
After sending the command line and the data block, the client awaits
the reply, which may be:
- "STORED\r\n", to indicate that the user is or has been logged in.
- "NOT_STORED\r\n", to indicate that there was a problem storing the
new user data.
Retrieval command:
------------------
The retrieval commands "get" and "gets" operates like this:
get <type/identifier>\r\n
gets <type/identifier> <type/identifier> <...>\r\n
- <type/identifier> is one of:
- session/<session_id> where <session_id> is the session of an
existing user.
> returns information about the user
- username/<username> where <username> is the (properly formatted)
username of a logged in user.
> returns information about the user
- list/
> returns a list of all online users
- online/
> returns an integer value of the online user count
After this command, the client expects zero or more items, each of
which is received as a text line followed by a data block. After all
the items have been transmitted, the server sends the string
"END\r\n"
to indicate the end of response.
Each item sent by the server looks like this:
VALUE <key> <flags> <bytes>\r\n
<data block>\r\n
- <key> is the key for the item being sent
- <flags> is set to 0
- <bytes> is the length of the data block to follow, *not* including
its delimiting \r\n
- <data block> is the data for this response, usually in JSON format (exception: online/).
If some of the keys appearing in a retrieval request are not sent back
by the server in the item list this means that the server does not
hold items with such keys (because they were never stored, or stored
but deleted to make space for more items, or expired, or explicitly
deleted by a client).
Logging out
--------
The command "delete" allows for explicit logging out of users:
delete <username>\r\n
- <username> is the username of the user the client wishes the server
to log out.
The response line to this command can be one of:
- "DELETED\r\n" to indicate success
- "NOT_FOUND\r\n" to indicate that the user with this username was not
found.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
AjaxIM_v4.0a.tar.gz (43个子文件)
libraries
db
MySQL.php 27KB
base.php 2KB
server
Default.php 11KB
NodeJS_Guests.php 4KB
NodeJS.php 6KB
base.php 539B
LICENSE.txt 1KB
ajaxim_memcached_protocol.txt 3KB
config.php 910B
install.php 26KB
js
im.load.js 3KB
im.js 94KB
jquery.jstore-all-min.js 15KB
jquery.jstore-all.js 29KB
jquery-1.3.2.js 56KB
jStore.swf 569B
jStore.Flash.html 1KB
jquery.md5.js 9KB
jquery.jsonp-1.1.0.js 7KB
ajaxim.php 3KB
server
server.js 34KB
config.js 1KB
themes
default
emoticons
wink.png 854B
waii.png 846B
evilgrin.png 868B
smile.png 853B
tongue.png 843B
grin.png 814B
unhappy.png 860B
happy.png 853B
surprised.png 850B
attribution.txt 548B
images
lrbox.png 212B
closemin.png 176B
bottom.png 121B
sr.png 141B
w.png 109B
player
playpause.png 706B
tooltip.png 234B
sl.png 142B
error.png 552B
theme.html 5KB
theme.css 14KB
共 43 条
- 1
春哥大魔王
- 粉丝: 190
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 微软常用运行库 游戏运行库 VC++各个版本
- 微信小程序开发教程.pptx
- MyBatis动态SQL是一种强大的特性,它允许我们在SQL语句中根据条件动态地添加或删除某些部分,从而实现更加灵活和高效的数据
- 锐捷网络认证中心网络管理.pdf
- MyBatis动态SQL是一种强大的特性,它允许我们在SQL语句中根据条件动态地添加或删除某些部分,从而实现更加灵活和高效的数据
- SD8233LF是一款用于单按键触摸及接近感应开关,其用途是替代传统的机械型开关芯片IC
- 基于YOLOv5的烟雾火焰检测算法研究
- 基于STM32的联合调试侦听设备解决方案原理图PCB源文件调试工具视频(大赛作品)
- MyBatis动态SQL是一种强大的特性,它允许我们在SQL语句中根据条件动态地添加或删除某些部分,从而实现更加灵活和高效的数据
- MyBatis动态SQL是一种强大的特性,它允许我们在SQL语句中根据条件动态地添加或删除某些部分,从而实现更加灵活和高效的数据
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页