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:
Shelikhoo 2022-01-24 11:51:49 +00:00
parent 657aaa6ba8
commit 6cb82618a0
No known key found for this signature in database
GPG key ID: C4D5E79D22B25316
3 changed files with 8 additions and 8 deletions

View file

@ -38,15 +38,15 @@ type WebRTCPeer struct {
func NewWebRTCPeer(config *webrtc.Configuration,
broker *BrokerChannel) (*WebRTCPeer, error) {
return NewWebRTCPeer3E(config, broker, nil)
return NewWebRTCPeerWithEvents(config, broker, nil)
}
// NewWebRTCPeer3E constructs a WebRTC PeerConnection to a snowflake proxy.
// NewWebRTCPeerWithEvents constructs a WebRTC PeerConnection to a snowflake proxy.
//
// The creation of the peer handles the signaling to the Snowflake broker, including
// the exchange of SDP information, the creation of a PeerConnection, and the establishment
// of a DataChannel to the Snowflake proxy.
func NewWebRTCPeer3E(config *webrtc.Configuration,
func NewWebRTCPeerWithEvents(config *webrtc.Configuration,
broker *BrokerChannel, eventsLogger event.SnowflakeEventReceiver) (*WebRTCPeer, error) {
if eventsLogger == nil {
eventsLogger = event.NewSnowflakeEventDispatcher()