mirror of
https://github.com/bluenviron/mediamtx
synced 2024-12-19 05:14:36 +00:00
19 lines
324 B
Go
19 lines
324 B
Go
package rtmp
|
|
|
|
import (
|
|
"github.com/notedit/rtmp/format/rtmp"
|
|
)
|
|
|
|
// Dial connects to a server in reading mode.
|
|
func Dial(address string) (*Conn, error) {
|
|
rconn, nconn, err := rtmp.NewClient().Dial(address, rtmp.PrepareReading)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return &Conn{
|
|
rconn: rconn,
|
|
nconn: nconn,
|
|
}, nil
|
|
}
|