2020-12-01 17:47:25 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Constants;
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* WebSocket 消息事件枚举
|
2020-12-01 17:47:25 +08:00
|
|
|
*
|
2020-12-02 15:14:29 +08:00
|
|
|
* Class SocketConstants
|
|
|
|
* @package App\Constants
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
2020-12-02 15:14:29 +08:00
|
|
|
class SocketConstants
|
2020-12-01 17:47:25 +08:00
|
|
|
{
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* 对话消息通知 - 事件名
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const EVENT_TALK = 'event_talk';
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* 键盘输入事件通知 - 事件名
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const EVENT_KEYBOARD = 'event_keyboard';
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* 用户在线状态通知 - 事件名
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const EVENT_ONLINE_STATUS = 'event_online_status';
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* 聊天消息撤销通知 - 事件名
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const EVENT_REVOKE_TALK = 'event_revoke_talk';
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* 好友申请消息通知 - 事件名
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const EVENT_FRIEND_APPLY = 'event_friend_apply';
|
|
|
|
|
|
|
|
/**
|
2020-12-02 15:14:29 +08:00
|
|
|
* WebSocket 消息消费队列交换机名称
|
2020-12-01 17:47:25 +08:00
|
|
|
*/
|
|
|
|
const CONSUMER_MESSAGE_EXCHANGE = 'im.message.fanout';
|
|
|
|
}
|