mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Moved function comments to their definitions
Increase readability of code a bit, the function descriptions were automatically placed in the constructor when we moved from coffeescript.
This commit is contained in:
parent
789285e0df
commit
64b66c855f
3 changed files with 17 additions and 23 deletions
|
@ -16,9 +16,8 @@ class Snowflake {
|
|||
|
||||
// Prepare the Snowflake with a Broker (to find clients) and optional UI.
|
||||
constructor(config, ui, broker) {
|
||||
// Receive an SDP offer from some client assigned by the Broker,
|
||||
// |pair| - an available ProxyPair.
|
||||
this.receiveOffer = this.receiveOffer.bind(this);
|
||||
|
||||
this.config = config;
|
||||
this.ui = ui;
|
||||
this.broker = broker;
|
||||
|
@ -85,6 +84,8 @@ class Snowflake {
|
|||
return this.retries++;
|
||||
}
|
||||
|
||||
// Receive an SDP offer from some client assigned by the Broker,
|
||||
// |pair| - an available ProxyPair.
|
||||
receiveOffer(pair, desc) {
|
||||
var e, offer, sdp;
|
||||
try {
|
||||
|
@ -156,13 +157,9 @@ class Snowflake {
|
|||
}
|
||||
|
||||
Snowflake.prototype.relayAddr = null;
|
||||
|
||||
Snowflake.prototype.rateLimit = null;
|
||||
|
||||
Snowflake.prototype.pollInterval = null;
|
||||
|
||||
Snowflake.prototype.retries = 0;
|
||||
|
||||
Snowflake.MESSAGE = {
|
||||
CONFIRMATION: 'You\'re currently serving a Tor user via Snowflake.'
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue