Unity Version: Use Async Socket API (If Possible)

Bug reports for the Unity Steam Beta.

Unity Version: Use Async Socket API (If Possible)

Postby WildCard65 » Fri Dec 06, 2019 4:44 pm

With the servers being down (as of right now), this lead me to notice a possible code improvement can be made.

The improvement: Switch the Socket stuff from blocking to non-blocking operations (if possible).
How I noticed: When the game attempts to connect, the UI freezes as the UI thread gets blocked during Socket IO.

The reason I'm suggesting to do it as it causes Windows to mis-believe the program has hung (evident in Event Viewer).
There are some gotcha's within .NET's Async APIs (one of which is a full blown deadlock), but all the APIs are (by convention) marked with "Async" suffix and either have no return or returns a task like object (May just be Task/Task<T>, depends on Unity's .NET target)
Image
User avatar
WildCard65
Doctor
Doctor
 
Posts: 195
Joined: Sat Apr 01, 2017 1:00 pm

Re: Unity Version: Use Async Socket API (If Possible)

Postby LevinSnakesRise » Sun Dec 15, 2019 10:58 pm

Moved to appropriate subforum (Yes it says Bug Reports, but this is the subforum where Devs want feedback, bug reports, and suggestions for Unity for the time being).
Please contact BMG with any questions regarding your account issues;
support@blankmediagames.zendesk.com

Thanks.
User avatar
LevinSnakesRise
Site Admin
Site Admin
 
Posts: 16789
Joined: Thu Aug 07, 2014 9:45 pm
Location: USA


Return to [UNITY] Steam Beta Bug Reports

Who is online

Users browsing this forum: No registered users and 2 guests