Use level-triggered events for listening stream sockets.
The limit of 20 accepted connections per event invocation can otherwise lead to no more connections being accepted when more that 20 connections are available at a time. This is an adaptation of @Boris-Barboris pull request #21 to restrict the level triggered behavior to listening sockets. See also #20.
This commit is contained in:
parent
eb595ef858
commit
fc5df2f949
5 changed files with 20 additions and 17 deletions
|
@ -72,7 +72,7 @@ final class SelectEventLoop : PosixEventLoop {
|
|||
{
|
||||
}
|
||||
|
||||
override void registerFD(FD fd, EventMask mask)
|
||||
override void registerFD(FD fd, EventMask mask, bool edge_triggered = true)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ final class SelectEventLoop : PosixEventLoop {
|
|||
{
|
||||
}
|
||||
|
||||
override void updateFD(FD fd, EventMask old_mask, EventMask mask)
|
||||
override void updateFD(FD fd, EventMask old_mask, EventMask mask, bool edge_triggered = true)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue