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
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue