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:
Cecylia Bocovich 2019-10-18 17:48:45 -04:00
parent 789285e0df
commit 64b66c855f
3 changed files with 17 additions and 23 deletions

View file

@ -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.'
};