reconnect method

void reconnect()

Closes the current socket and establishes a fresh connection.

Implementation

void reconnect() => _reconnect?.call();