Just like Khaled said before, once the data are send, you have an on sockwrite event. You can only queue 8192 bytes in the buffer to be sent, so with your while, you are reading 8192 bytes at each bread, but you are trying to queue all the file at the sametime. When you have an on sockwrite event, you queue 8192 bytes, another on sockwrite means the queue is empty, so you can queue another 8192 bytes ... and on. I hope you will understand how it works.
And you don't have to queue 8192 bytes, you can queue less that this if you want, 8192 is only the maximum.