stream-server/srt/server.go

22 lines
264 B
Go
Raw Normal View History

2023-09-18 11:51:55 +05:00
package srt
import (
"net"
)
func NewServer(port string) (error) {
l, err := net.ListenPacket("udp", ":" + port)
if err != nil {
return err
}
go start(l)
return nil
}
func start(l net.PacketConn) {
intake := NewIntake(l, 1)
for {
intake.Read()
}
}