mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
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:
parent
d9b076c32e
commit
76732155e7
5 changed files with 15 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue