支持保存推流数据包到文件. 打印拉流url

This commit is contained in:
yangjiechina
2024-07-04 22:35:55 +08:00
parent 4b1200d9ad
commit dfda276583
17 changed files with 280 additions and 81 deletions

View File

@@ -33,6 +33,19 @@ func (t *TCPSession) Init(source GBSource) {
t.receiveBuffer = stream.NewTCPReceiveBuffer()
}
func (t *TCPSession) Close() {
t.conn = nil
if t.source != nil {
t.source.Close()
t.source = nil
}
if t.decoder != nil {
t.decoder.Close()
t.decoder = nil
}
}
func NewTCPSession(conn net.Conn, filter Filter) *TCPSession {
session := &TCPSession{
conn: conn,