support reconnect and buffering