Skip to content

Switch to async socket lib #595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

theolivenbaum
Copy link

@theolivenbaum theolivenbaum commented Aug 18, 2021

@GregorBiswanger finally had some time to prepare a PR with my changes:

Quick summary of what changed:

  • Switch to a supported, asynchronous socket library (https://github.com/doghappy/socket.io-client-csharp / https://www.nuget.org/packages/SocketIOClient)
  • minor changes to the data model to replace arrays with objects on the response side
  • Added method to manually configure ElectronNET without using UseElectron(args) on IWebHostBuilder (something I needed)
  • Added new parameter to Start command to run from build output and not from publish output
  • Fix deadlock with reading properties twice, caused by the previous handler being removed by a new call to On(triggerEvent, () => { ... })
  • Exit Electron process immediately if ASP.NET process exits with non-zero exit code

Would probably be good if you do a quick review of the TS changes, I had originally only changed the JS side, then noticed you were using typescript for generating it :)

Closes #431

@GregorBiswanger GregorBiswanger self-assigned this Apr 6, 2022
@GregorBiswanger GregorBiswanger added this to the 18.6.1 milestone Apr 6, 2022
@GregorBiswanger GregorBiswanger merged commit 6f5fb16 into ElectronNET:master Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get properties that use Task.Run().Result seem to block execution
2 participants