Skip to main content
GameDev.net gamedev.net
🔒 Locked

Received Data

Started by Stamf Jan 31, 2003 at 12:20 AM 2 replies 200+ views
Original Post
Stamf
Stamf
G''day all, I have a question regarding received data from the internet, is there a C++ function that returns the amount of downloaded (and uploaded if possible) bytes since your connection? If so, I''d be ever so grateful if you told me the information, Thanks!
Fruny
Fruny
No. C++ knows nothing about Internet. Your operating system might, but without more information about it, I can only suggest you check its documentation.


[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Armand
Armand
Err,
This is a little vage, but does this help.

There is no straight function to return that data.

If your talking all data to and from your PC since start up (or connection), Then I know of no way under windows.
Under linux you could use ifconfig from a command line and pars the results.

If its just from your own program then you could just keep a count of how many byets you write and read from the socket.
This is if your doing networking the basic way and actually using sockets.

just my 2 cents.

Armand

Armand -------------------------It is a good day to code.
Stamf
Stamf
Thanks guys, btw, I meant bytes since connection.

I''m on WinXP Pro but if its a bit advanced like that, it definately isn''t for a newbie programmer like myself lol.

Thanks again people!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.