[tor-commits] [snowflake/master] Update to go-webrtc HEAD
arlo at torproject.org
arlo at torproject.org
Mon Feb 15 20:45:41 UTC 2016
commit 9fd471b4c4c081576141925831fa54eac3a34c90
Author: Arlo Breault <arlolra at gmail.com>
Date: Mon Feb 15 12:37:52 2016 -0800
Update to go-webrtc HEAD
---
client/snowflake.go | 7 +++----
server/snowflake.go | 5 ++---
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/client/snowflake.go b/client/snowflake.go
index 486e602..ba1561e 100644
--- a/client/snowflake.go
+++ b/client/snowflake.go
@@ -17,7 +17,6 @@ import (
"git.torproject.org/pluggable-transports/goptlib.git"
"github.com/keroserene/go-webrtc"
- "github.com/keroserene/go-webrtc/data"
)
var ptInfo pt.ClientInfo
@@ -49,7 +48,7 @@ func copyLoop(a, b net.Conn) {
type webRTCConn struct {
pc *webrtc.PeerConnection
- dc *data.Channel
+ dc *webrtc.DataChannel
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
// of the data channel, not the remote peer.
- pc.OnDataChannel = func(channel *data.Channel) {
+ pc.OnDataChannel = func(channel *webrtc.DataChannel) {
log.Println("OnDataChannel")
panic("OnDataChannel")
}
pr, pw := io.Pipe()
- dc, err := pc.CreateDataChannel("test", data.Init{})
+ dc, err := pc.CreateDataChannel("test", webrtc.Init{})
if err != nil {
log.Printf("CreateDataChannel: %s", err)
return nil, err
diff --git a/server/snowflake.go b/server/snowflake.go
index 1da419f..9a9c7dc 100644
--- a/server/snowflake.go
+++ b/server/snowflake.go
@@ -15,7 +15,6 @@ import (
"git.torproject.org/pluggable-transports/goptlib.git"
"github.com/keroserene/go-webrtc"
- "github.com/keroserene/go-webrtc/data"
)
var ptMethodName = "snowflake"
@@ -41,7 +40,7 @@ func copyLoop(a, b net.Conn) {
}
type webRTCConn struct {
- dc *data.Channel
+ dc *webrtc.DataChannel
pc *webrtc.PeerConnection
pr *io.PipeReader
}
@@ -117,7 +116,7 @@ func makePeerConnectionFromOffer(sdp *webrtc.SessionDescription, config *webrtc.
pc.OnIceComplete = func() {
answerChan <- struct{}{}
}
- pc.OnDataChannel = func(dc *data.Channel) {
+ pc.OnDataChannel = func(dc *webrtc.DataChannel) {
log.Println("OnDataChannel")
pr, pw := io.Pipe()
More information about the tor-commits
mailing list