Closed ziaratban closed 2 years ago
@ziaratban Thanks for bringing this up, but it's kind of hard to give useful information with this little information. What response are we talking about and what kind of DDoS are we talking about?
If you want to close the connection, you can simply call $connection->close()
. If you want to close the connection after sending some data (such as 100 bytes), you may call $connection->end($data)
together with a possible time out handling logic to also call close()
.
I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this :+1:
@clue thanks. I thinks It's better to continue this issue in https://github.com/ratchetphp/Ratchet/issues/892
Hi
How can i limit the size of the response from the client to prevent a ddos attack?
For example, after sending a client more than 100 bytes, the connection must be disconnected.
https://github.com/ratchetphp/Ratchet/issues/892