You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
package ws
import ( "fmt" "github.com/ouxuanserver/osmanthuswine/src/core" "time" )
type MessageCtl struct { core.Controller }
var now = time.Now()
func (t *MessageCtl) Checkin() { t.DisplayByData(map[string]interface{}{ "version": now, "status": "success", }) }
func (t *MessageCtl) Receive() { msg := new(Message) err := t.RequestToStruct(msg) if err != nil { t.DisplayByError(fmt.Sprintf("信息发送失败, error: %v", err), 0) } go N.Send(msg) // 通知特定的大屏幕和用户
t.DisplayByData(map[string]interface{}{ "date": time.Now(), "msg": "success", }) }
|