OBK/Yahoo Bandwith Measurer
I started experimenting (as you do when you're a bored programmer) last version of OBK annoyed me in the sense that if you started booting someone regardless of connection it shows you how much data (if you had an extremely unrealistic connection)
What i did to test this was i created my own server on 5085 (simulated a yahoo server) and i was managing to peak my transfer rate over a single socket at >400k/s without any optimization. Reason for trying this was simply because at the moment my up and download speed is 64kbit with a max of 8k/s... so i emulated the server to see what it could do in theory and in theory if you have a good upload speed you too can blast someone at 400k/s across the yahoo network.
Now then, this version is totally accurate if you have a slow upload speed this will look like it's crawling, this shows how many packets what you CAN upload as supposed to most (including my own) what you really are getting.
in programming terms if you send "Hello" what you're actually doing (if it's a none blocking socket) is you send "Hello" and it returns instantly, if you send a 10k string of "hello hello hello" under async it returns back instantly even though there's no way on this planet it was sent that quickly, internally what happens is your string gets sent to winsock and winsock will buffer your string and then send it piece by piece, now while this is happening your timer which happens every 1 - 10ms gets called and again it tries to send 10k again, this time the routine sends back -1 meaning "no no you gave me data, wait...." and every 5 ms you'll get -1 until 8 seconds or so later on a slow connection you'll get back 80222 or whatever to say yes we just took the data, now you'll get -1 again lol
Winsock handles a nice large buffer to send, you could send 100k's worth and just sit there for 30 seconds not sending anything again it's left control of the program and programmer and windows deals with it internally, so i explored this and wrote a nice little 1 second timer resolution bandwidth calculator to watch it properly
Source: www.viprasys.com - cjdelphi