-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Add a nonblocking tarpit. A tarpit is a way to slow down requests responses to stop bots from sending requests so frequently, it cannot consume extra capacity by sleeping.
The challenge here is to not close the sockets after they go out of scope in the epoll iteration loop. I need to figure out rust lifetimes to borrow them in the tarpit data structure until they are removed & responded to.
The drop fn that gets called at the end of the TcpStream lifetime calls close on the socket's file descriptor, so I need to use lifetime specifiers to prevent this.
Metadata
Metadata
Assignees
Labels
No labels