feat: 接线 serve 真实 auth/注册/管理/MQTT 与消息循环

This commit is contained in:
Nixevol
2026-09-30 07:56:25 +08:00
parent 550ed534e4
commit 0efcfbb8b6
9 changed files with 699 additions and 80 deletions
+5
View File
@@ -101,6 +101,11 @@ func (s *Session) Attach(b *Broker) {
s.b = b
}
// SetPresence 接线时在创建最终 presence 实现后注入(可替换占位)。
func (s *Session) SetPresence(p PresenceSink) {
s.presence = p
}
func (s *Session) OnSessionEstablished(ctx context.Context, conn port.ConnInfo) error {
if s.b != nil {
s.b.startHandshakeDeadline(conn.EndpointID, conn.ConnID, handshakeTimeout)