close method
Closed the connection.
Implementation
@override
void close() {
connecting = false;
messageHandler = null;
onError = onDone = null;
if (messageSubscription != null) {
messageSubscription.cancel();
messageSubscription = null;
}
if (socket != null) {
socket.close();
socket = null;
}
}