mirror of
https://github.com/lkmio/lkm.git
synced 2025-10-05 15:16:49 +08:00
支持rtmpserver收流
This commit is contained in:
23
rtmp/rtmp_server_test.go
Normal file
23
rtmp/rtmp_server_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package rtmp
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestServer(t *testing.T) {
|
||||
impl := serverImpl{}
|
||||
addr := "0.0.0.0:1935"
|
||||
tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = impl.Start(tcpAddr)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
println("启动rtmp服务成功:" + addr)
|
||||
select {}
|
||||
}
|
Reference in New Issue
Block a user