Skip to content

Commit b15ea5e

Browse files
committed
add javadoc documentation for upload/download rate-limit functionality
1 parent 2e643f4 commit b15ea5e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/main/java/com/turn/ttorrent/client/Client.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,22 @@ public Client(InetAddress address, SharedTorrent torrent)
172172
this.random = new Random(System.currentTimeMillis());
173173
}
174174

175+
/**
176+
* Set the maximum download rate (in kb/second) for this
177+
* torrent. A setting of <= 0.0 disables rate limiting.
178+
*
179+
* @param rate The maximum download rate
180+
*/
175181
public void setMaxDownloadRate(double rate){
176182
this.torrent.setMaxDownloadRate(rate);
177183
}
178184

185+
/**
186+
* Set the maximum upload rate (in kb/second) for this
187+
* torrent. A setting of <= 0.0 disables rate limiting.
188+
*
189+
* @param rate The maximum upload rate
190+
*/
179191
public void setMaxUploadRate(double rate){
180192
this.torrent.setMaxUploadRate(rate);
181193
}

src/main/java/com/turn/ttorrent/client/SharedTorrent.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ public double getMaxUploadRate(){
253253
return this.maxUploadRate;
254254
}
255255

256+
/**
257+
* Set the maximum upload rate (in kb/second) for this
258+
* torrent. A setting of <= 0.0 disables rate limiting.
259+
*
260+
* @param rate The maximum upload rate
261+
*/
256262
public void setMaxUploadRate(double rate){
257263
this.maxUploadRate = rate;
258264
}
@@ -261,6 +267,12 @@ public double getMaxDownloadRate(){
261267
return this.maxDownloadRate;
262268
}
263269

270+
/**
271+
* Set the maximum download rate (in kb/second) for this
272+
* torrent. A setting of <= 0.0 disables rate limiting.
273+
*
274+
* @param rate The maximum download rate
275+
*/
264276
public void setMaxDownloadRate(double rate){
265277
this.maxDownloadRate = rate;
266278
}

0 commit comments

Comments
 (0)