Fix #50 connect failure.

Add a buffer size check to fix the problem. I didn't test it for crtmpserver, i just test it for my own rtmpserver. PLS test it.