This repository has been archived on 2021-11-25. You can view files and clone it, but cannot push or open issues or pull requests.
BookFloatingServer/BookFloatingServer服务端通信准则(草稿).txt
2017-03-08 21:05:24 +08:00

46 lines
719 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

BookFloatingServer服务端通信准则草稿
版本v1.0 (20170308)
整个通信采用TCP-Socket连接地址gameharbor.cn 端口55555
消息次序:
客户端先发送JSON字符串服务器进行操作后返回JSON字符串.
客户端可随时断开连接,但此连接将不可恢复.
JSON标准
1.注册
字段 值
type register必须
email 注册用户Email
nickname昵称
school 学校
pwass 登录密码(明文)
示例
{'type':'register','email':'test@163.com','nickname':'Kirito','school':'QUST','pwass':'dvaLovesU'}
返回值
字段 值
ret 操作返回值(一般为1时是正常的)
示例
{'ret':'1'}
2.登录
字段 值
type login必须
email 注册时Email
pwass 登录密码(明文)
示例
{'type':'login','email':'test@163.com','pwass':'dvaLovesU'}
返回值
字段 值
ret 操作返回值(0时为正常)
示例
{'ret':'0'}