Update to go-webrtc HEAD

This commit is contained in:
Arlo Breault 2016-02-15 12:37:52 -08:00
parent 254223be0f
commit 9fd471b4c4
2 changed files with 5 additions and 7 deletions

View file

@ -17,7 +17,6 @@ import (
"git.torproject.org/pluggable-transports/goptlib.git" "git.torproject.org/pluggable-transports/goptlib.git"
"github.com/keroserene/go-webrtc" "github.com/keroserene/go-webrtc"
"github.com/keroserene/go-webrtc/data"
) )
var ptInfo pt.ClientInfo var ptInfo pt.ClientInfo
@ -49,7 +48,7 @@ func copyLoop(a, b net.Conn) {
type webRTCConn struct { type webRTCConn struct {
pc *webrtc.PeerConnection pc *webrtc.PeerConnection
dc *data.Channel dc *webrtc.DataChannel
recvPipe *io.PipeReader recvPipe *io.PipeReader
} }
@ -131,14 +130,14 @@ func dialWebRTC(config *webrtc.Configuration, broker *BrokerChannel) (
} }
// This callback is not expected, as the Client initiates the creation // This callback is not expected, as the Client initiates the creation
// of the data channel, not the remote peer. // of the data channel, not the remote peer.
pc.OnDataChannel = func(channel *data.Channel) { pc.OnDataChannel = func(channel *webrtc.DataChannel) {
log.Println("OnDataChannel") log.Println("OnDataChannel")
panic("OnDataChannel") panic("OnDataChannel")
} }
pr, pw := io.Pipe() pr, pw := io.Pipe()
dc, err := pc.CreateDataChannel("test", data.Init{}) dc, err := pc.CreateDataChannel("test", webrtc.Init{})
if err != nil { if err != nil {
log.Printf("CreateDataChannel: %s", err) log.Printf("CreateDataChannel: %s", err)
return nil, err return nil, err

View file

@ -15,7 +15,6 @@ import (
"git.torproject.org/pluggable-transports/goptlib.git" "git.torproject.org/pluggable-transports/goptlib.git"
"github.com/keroserene/go-webrtc" "github.com/keroserene/go-webrtc"
"github.com/keroserene/go-webrtc/data"
) )
var ptMethodName = "snowflake" var ptMethodName = "snowflake"
@ -41,7 +40,7 @@ func copyLoop(a, b net.Conn) {
} }
type webRTCConn struct { type webRTCConn struct {
dc *data.Channel dc *webrtc.DataChannel
pc *webrtc.PeerConnection pc *webrtc.PeerConnection
pr *io.PipeReader pr *io.PipeReader
} }
@ -117,7 +116,7 @@ func makePeerConnectionFromOffer(sdp *webrtc.SessionDescription, config *webrtc.
pc.OnIceComplete = func() { pc.OnIceComplete = func() {
answerChan <- struct{}{} answerChan <- struct{}{}
} }
pc.OnDataChannel = func(dc *data.Channel) { pc.OnDataChannel = func(dc *webrtc.DataChannel) {
log.Println("OnDataChannel") log.Println("OnDataChannel")
pr, pw := io.Pipe() pr, pw := io.Pipe()