fix bug of BufferedStream
add tcp send/recv test