mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Refactor WebRTC Peer,Dialer's name to be readable
See also: https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/67#note_2771666
This commit is contained in:
parent
657aaa6ba8
commit
6cb82618a0
3 changed files with 8 additions and 8 deletions
|
@ -147,11 +147,11 @@ type WebRTCDialer struct {
|
|||
}
|
||||
|
||||
func NewWebRTCDialer(broker *BrokerChannel, iceServers []webrtc.ICEServer, max int) *WebRTCDialer {
|
||||
return NewWebRTCDialer4E(broker, iceServers, max, nil)
|
||||
return NewWebRTCDialerWithEvents(broker, iceServers, max, nil)
|
||||
}
|
||||
|
||||
// NewWebRTCDialer4E constructs a new WebRTCDialer.
|
||||
func NewWebRTCDialer4E(broker *BrokerChannel, iceServers []webrtc.ICEServer, max int, eventLogger event.SnowflakeEventReceiver) *WebRTCDialer {
|
||||
// NewWebRTCDialerWithEvents constructs a new WebRTCDialer.
|
||||
func NewWebRTCDialerWithEvents(broker *BrokerChannel, iceServers []webrtc.ICEServer, max int, eventLogger event.SnowflakeEventReceiver) *WebRTCDialer {
|
||||
config := webrtc.Configuration{
|
||||
ICEServers: iceServers,
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ func NewWebRTCDialer4E(broker *BrokerChannel, iceServers []webrtc.ICEServer, max
|
|||
func (w WebRTCDialer) Catch() (*WebRTCPeer, error) {
|
||||
// TODO: [#25591] Fetch ICE server information from Broker.
|
||||
// TODO: [#25596] Consider TURN servers here too.
|
||||
return NewWebRTCPeer3E(w.webrtcConfig, w.BrokerChannel, w.eventLogger)
|
||||
return NewWebRTCPeerWithEvents(w.webrtcConfig, w.BrokerChannel, w.eventLogger)
|
||||
}
|
||||
|
||||
// GetMax returns the maximum number of snowflakes to collect.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue