mirror of
https://github.com/lkmio/lkm.git
synced 2025-09-27 03:26:01 +08:00
完善rtmp server
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package rtmp
|
||||
|
||||
import (
|
||||
"github.com/yangjiechina/avformat"
|
||||
"github.com/yangjiechina/avformat/transport"
|
||||
"github.com/yangjiechina/avformat/utils"
|
||||
"net"
|
||||
)
|
||||
|
||||
@@ -17,7 +17,7 @@ type serverImpl struct {
|
||||
}
|
||||
|
||||
func (s *serverImpl) Start(addr net.Addr) error {
|
||||
avformat.Assert(s.tcp == nil)
|
||||
utils.Assert(s.tcp == nil)
|
||||
|
||||
server := &transport.TCPServer{}
|
||||
server.SetHandler(s)
|
||||
@@ -37,7 +37,7 @@ func (s *serverImpl) Close() {
|
||||
|
||||
func (s *serverImpl) OnConnected(conn net.Conn) {
|
||||
t := conn.(*transport.Conn)
|
||||
t.Data = NewSession()
|
||||
t.Data = NewSession(conn)
|
||||
}
|
||||
|
||||
func (s *serverImpl) OnPacket(conn net.Conn, data []byte) {
|
||||
|
Reference in New Issue
Block a user