diff --git a/conn-client-udpl.go b/conn-client-udpl.go index 5833b535..38b49403 100644 --- a/conn-client-udpl.go +++ b/conn-client-udpl.go @@ -33,8 +33,7 @@ func (l *connClientUDPListener) close() { l.pc.Close() } -// Read reads a frame from the publisher. -func (l *connClientUDPListener) Read(buf []byte) (int, error) { +func (l *connClientUDPListener) read(buf []byte) (int, error) { for { n, addr, err := l.pc.ReadFrom(buf) if err != nil { diff --git a/conn-client.go b/conn-client.go index bb710180..70c680fc 100644 --- a/conn-client.go +++ b/conn-client.go @@ -446,7 +446,7 @@ func (c *ConnClient) SetupUDP(u *url.URL, track *Track, rtpPort int, rtcpListener.publisherPort = (*th.ServerPorts)[1] c.rtcpListeners[track.Id] = rtcpListener - return rtpListener.Read, rtcpListener.Read, res, nil + return rtpListener.read, rtcpListener.read, res, nil } // SetupTCP writes a SETUP request, that means that we want to read