Close the message port and free any resources associated with it.
Future<void> close() => platform.close();