聊天im

> 连接地址:wss模式:`wss://qf.huamais.com/wss` >d 所有通讯均采用标准json格式 例:{type:login, client_name:xx, room_id:1} type值不同操作也不同 |type|介绍|备注| |-|-|-| |ping|维持心跳|客户端必须回应{type:pong}| |login|登陆|{type:login, client_name:登陆用户名,avatar:用户头像, room_id:房间号}| |say|发送消息或者接收到消息|| |join|有新用户加入|| |logout|用户退出|| |error|异常|| |connect|第一次连接成功|| # say 发送消息格式 {type:say, content:发送内容} # say 监听到消息格式 {type:say, from_client_name:发送消息的用户昵称,avatar:用户头像,content:发送的内容,time:发送时间} # join 有新用户加入 {type:join, client_name:加入的用户昵称,avatar:用户头像,time:加入时间} # logout 用户退出 {type:logout, client_name:用户昵称,avatar:用户头像,time:退出时间}