XtremeKevinChow / lidgren-network-gen3

Automatically exported from code.google.com/p/lidgren-network-gen3
0 stars 0 forks source link

Incorrect documentation #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For NetPeerConfiguration.ThrottleBytesPerSecond it is written:
Gets or sets the number of allowed bytes to be sent per second per connection; 
0 means unlimited

If you look at the source: 
http://code.google.com/p/lidgren-network-gen3/source/browse/trunk/Lidgren.Networ
k/NetPeerConfiguration.cs#348, you notice that thottleBytesPerSecond cannot be 
lower than MTU.

Original issue reported on code.google.com by NN1436401@gmail.com on 19 Aug 2010 at 6:56

GoogleCodeExporter commented 9 years ago
Fixed in r103

Original comment by lidg...@gmail.com on 19 Aug 2010 at 7:11

GoogleCodeExporter commented 9 years ago
What about VerifyAndLock method 
http://code.google.com/p/lidgren-network-gen3/source/browse/trunk/Lidgren.Networ
k/NetPeerConfiguration.cs?spec=svn103&r=103#113
?

Why does this method check m_throttleBytesPerSecond while does not check other 
fields ?
In any case the fields can be set only if they are correct, so this check is 
useless somehow.

Original comment by NN1436401@gmail.com on 19 Aug 2010 at 7:54

GoogleCodeExporter commented 9 years ago
With throttling equals 0, somehow everything stops working..

Do you have any ideas why  ?

Original comment by NN1436401@gmail.com on 19 Aug 2010 at 7:57

GoogleCodeExporter commented 9 years ago
Oops, throttling bug; unlimited throttling hasn't been tested properly - it's 
seldom a good idea. Fixed in r104

Original comment by lidg...@gmail.com on 19 Aug 2010 at 8:06

GoogleCodeExporter commented 9 years ago
What about VerifyAndLock method ?

Original comment by NN1436401@gmail.com on 19 Aug 2010 at 8:20

GoogleCodeExporter commented 9 years ago
It's not faulty code; just slightly superflous. The idea is still good; 
verifying configuration before locking it.

Original comment by lidg...@gmail.com on 19 Aug 2010 at 9:33

GoogleCodeExporter commented 9 years ago
The problem that you can set ThrottleBytesPerSecond to 0 but then you fail in 
VerifyAndLock.
Again inconsistency.

Original comment by NN1436401@gmail.com on 19 Aug 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Aw shucks, testing it worked fine but I didn't realize it had silently updated 
my throttle number. Fixed in r105

Original comment by lidg...@gmail.com on 19 Aug 2010 at 9:45