Cap the resource used by each connection #221
Labels
enhancement
New feature or request
proposal
Proposal for this repo
stale
waiting for response
waiting for the response from commenter
Milestone
it's important for gnet to cap per connection resource usage as other systems do, for example Linux kernal has options for per connection send/recv buffer size. In gnet's case, per connection's send buf size and async tasks number should be capped.
Suggestion: to expose per conn options MaxPendingWriteTasksPerConn and MaxWriteBuffSizePerConn
When client calls AsyncWrite:
With this change, the caller is aware of the error immediately when one of the two limits is reached. I am not sure how difficult to do the buf size check within AsyncWrite in a lock-free fashion though.
The text was updated successfully, but these errors were encountered: