Ported snowflake client to work with pion/webrtc

Modified the snowflake client to use pion/webrtc as the webrtc library.
This involved a few small changes to match function signatures as well
as several larger ones:
- OnNegotiationNeeded is no longer supported, so CreateOffer and
SetLocalDescription have been moved to a go routine called after the
other peer connection callbacks are set
- We need our own deserialize/serialize functions
- We need to use a SettingEngine in order to access the
OnICEGatheringStateChange callback
This commit is contained in:
Cecylia Bocovich 2019-06-25 16:35:37 -04:00
parent 0428797ea0
commit b5c50b69d0
6 changed files with 146 additions and 76 deletions

View file

@ -52,5 +52,5 @@ type SocksConnector interface {
// Interface for the Snowflake's transport. (Typically just webrtc.DataChannel)
type SnowflakeDataChannel interface {
io.Closer
Send([]byte)
Send([]byte) error
}