connect static method
Implementation
static Future<CastSession> connect(String sessionId, CastDevice device, [Duration? timeout]) async {
final _socket = await CastSocket.connect(
device.host,
device.port,
timeout,
);
final session = CastSession._(sessionId, _socket);
session._startListening();
session.sendMessage(kNamespaceConnection, {
'type': 'CONNECT',
});
return session;
}