Remove Snowflake interface, use *WebRTCPeer directly.

The other interfaces in client/lib/interfaces.go exist for the purpose
of running tests, but not Snowflake. Existing code would not have worked
with other types anyway, because it does unchecked .(*WebRTCPeer)
conversions.
This commit is contained in:
David Fifield 2020-04-24 14:21:08 -06:00
parent d9b076c32e
commit 76732155e7
5 changed files with 15 additions and 28 deletions

View file

@ -14,8 +14,6 @@ import (
)
// Remote WebRTC peer.
// Implements the |Snowflake| interface, which includes
// |io.ReadWriter| and |Connector|.
//
// Handles preparation of go-webrtc PeerConnection. Only ever has
// one DataChannel.
@ -87,7 +85,6 @@ func (c *WebRTCPeer) Write(b []byte) (int, error) {
return len(b), nil
}
// As part of |Snowflake|
func (c *WebRTCPeer) Close() error {
c.once.Do(func() {
c.closed = true