代码整理
This commit is contained in:
@@ -102,22 +102,22 @@ func (h *Hook) OnRetainMessage(cl *mqtt.Client, pk packets.Packet, r int64) {
|
||||
|
||||
// OnQosPublish is called when a publish packet with Qos is issued to a subscriber.
|
||||
func (h *Hook) OnQosPublish(cl *mqtt.Client, pk packets.Packet, sent int64, resends int) {
|
||||
h.Log.Debug("inflight out", "m", h.packetMeta(pk))
|
||||
h.Log.Debug("在飞行中---消息已经发出但尚未收到确认", "m", h.packetMeta(pk))
|
||||
}
|
||||
|
||||
// OnQosComplete is called when the Qos flow for a message has been completed.
|
||||
func (h *Hook) OnQosComplete(cl *mqtt.Client, pk packets.Packet) {
|
||||
h.Log.Debug("inflight complete", "m", h.packetMeta(pk))
|
||||
h.Log.Debug("飞行完成---消息已经成功发送并得到了确认", "m", h.packetMeta(pk))
|
||||
}
|
||||
|
||||
// OnQosDropped is called the Qos flow for a message expires.
|
||||
func (h *Hook) OnQosDropped(cl *mqtt.Client, pk packets.Packet) {
|
||||
h.Log.Debug("inflight dropped", "m", h.packetMeta(pk))
|
||||
h.Log.Debug("飞行丢弃---消息在传输过程中被丢弃", "m", h.packetMeta(pk))
|
||||
}
|
||||
|
||||
// OnLWTSent is called when a Will Message has been issued from a disconnecting client.
|
||||
func (h *Hook) OnLWTSent(cl *mqtt.Client, pk packets.Packet) {
|
||||
h.Log.Debug("sent lwt for client", "method", "OnLWTSent", "client", cl.ID)
|
||||
h.Log.Debug("sent lwt for client 遗嘱", "method", "OnLWTSent", "client", cl.ID)
|
||||
}
|
||||
|
||||
// OnRetainedExpired is called when the server clears expired retained messages.
|
||||
|
||||
Reference in New Issue
Block a user