add buffered socket io
fix test code