Improved performance

* Replaced overshooting loop with simple recv loop
* Use sendall and allow lower level to push efficiently

after these changes there is a major performance improvement.