connect method

  1. @override
Future connect()
override

Connects to the server.

Implementation

@override
Future connect() {
  if (_socket != null) throw StateError('Already connected');
  return _socket = Socket.connect(host, port);
}