Skip to content
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

Investigate async TCP connection #665

Open
xPaw opened this issue Apr 25, 2019 · 2 comments
Open

Investigate async TCP connection #665

xPaw opened this issue Apr 25, 2019 · 2 comments
Milestone

Comments

@xPaw
Copy link
Member

xPaw commented Apr 25, 2019

10:12 <@Netshroud> xPaw: we probably could use Socket.Select to have one thread handle N connections, but I'd rather just switch to async methods and let the thread pool handle it (like websocket does)

Currently, each SK2 connection creates a new thread, so in extreme examples like steamstat.us monitoring, there's a thread for each CM connection (over 200 of them!).

I also noticed sending packets is done on the main thread, and not the thread created for the socket polling/reading.

@yaakov-h yaakov-h added this to the 2.next milestone Apr 27, 2019
@yaakov-h
Copy link
Member

I also noticed sending packets is done on the main thread, and not the thread created for the socket polling/reading.

Pretty sure that's intentional, it's done on whatever thread triggered the action. We don't queue them up for the socket reader thread.

@xPaw
Copy link
Member Author

xPaw commented Mar 21, 2023

This is probably no longer really relevant with websockets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants