Skip to content

Commit

Permalink
feat: server.Server 支持使用 PushAsyncMessage 快捷发布异步消息
Browse files Browse the repository at this point in the history
  • Loading branch information
kercylan98 committed Nov 6, 2023
1 parent d191dab commit 0b77cc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,3 +748,8 @@ func (slf *Server) dispatchMessage(msg *Message) {
log.Warn("Server", log.String("not support message type", msg.t.String()))
}
}

// PushAsyncMessage 是 PushAsyncMessage 的快捷方式
func (slf *Server) PushAsyncMessage(caller func() error, callback func(err error), mark ...any) {
PushAsyncMessage(slf, caller, callback, mark...)
}

0 comments on commit 0b77cc9

Please sign in to comment.