connect method

void connect(
  1. Uri address,
  2. VoidCallback onConnected,
  3. StringCallback onError, {
  4. int timeoutSeconds = 15,
  5. bool ignoreBadCert = false,
})
override

Connects the socket to uri then invokes onConnected or onError.

Implementation

void connect(Uri address, VoidCallback onConnected, StringCallback onError,
    {int timeoutSeconds = 15, bool ignoreBadCert = false}) {
  connected = true;
  closed = false;
  onConnected();
}