Closes the transport and flushes any pending buffer.
@override Future<void> close() async { clear(); }