davidfowl / BedrockFramework

High performance, low level networking APIs for building custom servers and clients.
MIT License
1.05k stars 153 forks source link

Can a single connection support writing in concurrent scenarios? #125

Closed eventhorizon-cli closed 1 year ago

eventhorizon-cli commented 2 years ago

Can a single connection support writing in concurrent scenarios? Should I use pool?

adamradocz commented 2 years ago

The WriteAsync method uses a SemaphoreSlim, so I'd say it's thread safe.