1. Dart
2. dart:io
3. ConnectionTask<S>
4. cancel method

##### ConnectionTask class

1. Properties
2. hashCode
3. runtimeType
4. socket
5. Methods
6. cancel
7. noSuchMethod
8. toString
9. Operators
10. operator ==

description

# cancel method Null safety

void cancel ()

Cancels the connection attempt.

This also causes the socket `Future` to complete with a SocketException error.

## Implementation

    void cancel() {
      _onCancel();
    }