How do applications (such as P2P clients) report a socket connection's transfer rate? Is there an API for obtaining this information?