增加查询拉流列表接口

This commit is contained in:
yangjiechina
2024-10-29 19:57:52 +08:00
parent ec707c8dc1
commit 6841c4725f
11 changed files with 108 additions and 31 deletions

View File

@@ -18,7 +18,7 @@ type StreamServer[T any] struct {
}
func (s *StreamServer[T]) OnConnected(conn net.Conn) []byte {
log.Sugar.Debugf("%s连接 conn:%s", s.SourceType.ToString(), conn.RemoteAddr().String())
log.Sugar.Debugf("%s连接 conn:%s", s.SourceType.String(), conn.RemoteAddr().String())
conn.(*transport.Conn).Data = s.Handler.OnNewSession(conn)
return nil
}
@@ -32,7 +32,7 @@ func (s *StreamServer[T]) OnPacket(conn net.Conn, data []byte) []byte {
}
func (s *StreamServer[T]) OnDisConnected(conn net.Conn, err error) {
log.Sugar.Debugf("%s断开连接 conn:%s", s.SourceType.ToString(), conn.RemoteAddr().String())
log.Sugar.Debugf("%s断开连接 conn:%s", s.SourceType.String(), conn.RemoteAddr().String())
t := conn.(*transport.Conn)
if t.Data != nil {