Upload files to ''
This commit is contained in:
parent
5bbc73bbdd
commit
821e0f97c0
45
BookFloatingServer服务端通信准则(草稿).txt
Normal file
45
BookFloatingServer服务端通信准则(草稿).txt
Normal file
|
@ -0,0 +1,45 @@
|
|||
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'}
|
||||
|
||||
|
Reference in New Issue
Block a user