package utils

import (
	"github.com/zjxpcyc/websocket"
)

// ClientID 消息对象
type ClientID websocket.ClientID

// Message 发送消息
type Message websocket.Message

// 消息类型
const (
	WsMessage     = "websocket"
	WechatMessage = "wechat"
	SMSMessage    = "sms"
)

// SendWs 发送 websocket
func SendWs(message Message) {
	msg := websocket.Message(message)
	websocket.Send(msg)
}

// SendMessage 发送消息
func SendMessage(message Message, msgType string) {
	switch msgType {
	case WsMessage:
		SendWs(message)
	case WechatMessage:
	case SMSMessage:
	default:
	}
}
