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.
12 lines
173 B
12 lines
173 B
package ws
|
|
|
|
func init() {
|
|
N.SetMiddleware("msg", msgFunc)
|
|
}
|
|
|
|
// 简单明了
|
|
func msgFunc(c *Client, msg *Message) {
|
|
msg.RoomId = c.RoomId
|
|
msg.From = c.Id
|
|
c.Send(msg)
|
|
}
|