Closed honglei closed 1 year ago
The getTxRate() returns the current "snapshot" rate the underlying session is using at the moment the call is invoked. With congestion control, that will vary dynamically. The NORM code does maintain some statistics including an averaged transmission rate. That information is output into the text logging that can be enabled, I plan to provide a TLV-style API to request those statistics from the underlying code and provide controls to set the averaging intervals, etc but have not done that yet.
There are some ways to use the existing API calls (I need to check if all of those are exposed in the Python binding) for the receiver to get what portion of an object (e.g., file) has been received. Similarly the information for getting the current transmit "index" for a transmit object could be provided. But I don't have that feature yet.
There are existing packet loss tracking in the code that is also showed in the logging output and would also be accessible in the API to fetch those stats from the underlying NormSession.
I should probably have a development roadmap file that outlines these objectives and gives the intended order to work those. My current, unfortunately very limited, time spent on NORM has been with the NormSocket API extension to provide a simpler API for some typical NORM uses cases (and provide Python and Java bindings for that extension when it is complete). But I am willing to list out the things that need to be tackled and accept suggestions from the users on how those should be prioritized.
I wrote an application for testing pynorm, https://github.com/honglei/fastapi-norm, the python binding is modified to be more pythonic, pls check if the modifications are correct and match your will. If all things are ok, I'll try to commit a pull request.
real
send rate, functiongetTxRate
return is always too high or too low;