flush socket buffer after sending