It can actually take screenshots of the VM
This commit is contained in:
@@ -84,13 +84,21 @@ namespace RemoteFrameBuffer
|
||||
throw new Exception("Cannot parse protocol version");
|
||||
}
|
||||
RfbProtoVersion serverVersion = new(Int16.Parse(m.Groups["major"].Value), Int16.Parse(m.Groups["minor"].Value));
|
||||
RfbProtoVersion maxProto = _protocolHandlers.Keys.Where((ph) => ph <= serverVersion).Max();
|
||||
RfbProtoVersion[] supportedProto = _protocolHandlers.Keys.Where((ph) => ph <= serverVersion).ToArray();
|
||||
if (supportedProto.Length == 0)
|
||||
{
|
||||
throw new NotSupportedException("No common protocol between client and server");
|
||||
}
|
||||
RfbProtoVersion maxProto = supportedProto.Max();
|
||||
RemoteFrameBufferClientProtocol proto = _protocolHandlers[maxProto].Construct(s);
|
||||
Console.Error.WriteLine($"Using client protocol {proto.Version.Major}.{proto.Version.Minor}");
|
||||
proto.Handshake();
|
||||
proto.Initialization();
|
||||
// TODO: register auth callback and the like
|
||||
proto.Handshake(this.cancellationTokenSource.Token);
|
||||
proto.Initialization(this.cancellationTokenSource.Token);
|
||||
proto.StartListener(this.cancellationTokenSource.Token).Wait();
|
||||
}
|
||||
|
||||
#warning REMOVE THIS
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user