mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
improve client interface specificity and composability which eliminates much unnecessary code
This commit is contained in:
parent
02562ba750
commit
4ca0a3aa0a
6 changed files with 100 additions and 104 deletions
|
@ -128,7 +128,7 @@ func NewWebRTCDialer(
|
|||
}
|
||||
|
||||
// Initialize a WebRTC Connection by signaling through the broker.
|
||||
func (w WebRTCDialer) Catch() (*webRTCConn, error) {
|
||||
func (w WebRTCDialer) Catch() (Snowflake, error) {
|
||||
if nil == w.BrokerChannel {
|
||||
return nil, errors.New("Cannot Dial WebRTC without a BrokerChannel.")
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ func NewCopyPasteDialer(iceServers IceServerList) *CopyPasteDialer {
|
|||
}
|
||||
|
||||
// Initialize a WebRTC connection via manual copy-paste.
|
||||
func (d *CopyPasteDialer) Catch() (*webRTCConn, error) {
|
||||
func (d *CopyPasteDialer) Catch() (Snowflake, error) {
|
||||
if nil == d.signal {
|
||||
return nil, errors.New("Cannot copy-paste dial without signal pipe.")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue