public override async Task ClipboardUpdate(RegisterConnection request, IServerStreamWriter <ClipboardEntryMessage> responseStream, ServerCallContext context) { _service.AddDevice(request.DeviceName, new BroadcasterServiceData(responseStream, context)); await Task.Run(async() => { context.CancellationToken.Register(() => { _service.RemoveDevice(request.DeviceName); }); while (true) { await Task.Delay(50); } }); }
public void RegisterRegisterConnectionDelegate(RegisterConnection <TPacket> registerConnectionDelegate) { ConnectionRegisteredEvent += registerConnectionDelegate; }
public RegisterController(RegisterConnection conn) { _Connection = conn; }