If you open current connections in the windows control panel, right-click on the active connection and click on the status item, you can see the following window:
How do I get the value that is circled in red in the screenshot?
The function of checking for the current connection has already been found (I don’t know how to insert the code here), it remains to be easy - to find out the maximum speed.

{}button in the editor. - insolor