slight refactoring, WS sends periodic ping

This commit is contained in:
David Zhao
2020-12-20 16:13:12 -08:00
parent 72d853589c
commit 684099d653
9 changed files with 75 additions and 37 deletions
+5
View File
@@ -2,6 +2,7 @@ package rtc
import (
"encoding/json"
"io"
"strings"
"github.com/pion/webrtc/v3"
@@ -85,3 +86,7 @@ func FromProtoTrickle(trickle *livekit.Trickle) webrtc.ICECandidateInit {
json.Unmarshal([]byte(trickle.CandidateInit), &ci)
return ci
}
func IsEOF(err error) bool {
return err == io.ErrClosedPipe || err == io.EOF
}