make receiving more stable
add acknowledge when receiving data
fix ACK sending and closing thread