vibe.d beta banner
get vibe.d

Asynchronous I/O that doesn’t get in your way, written in D

Variable HTTPServerSettings.rejectConnectionPredicate

Provides a way to reject incoming connections as early as possible.

class HTTPServerSettings
  // ...
  nothrow @safe bool delegate(in NetworkAddress) rejectConnectionPredicate ;
  // ...

Allows to ban and unban network addresses and reduce the impact of DOS attacks.

If the callback returns true for a specific NetworkAddress, then all incoming requests from that address will be rejected.


Sönke Ludwig, Jan Krüger, Ilya Shipunov


© 2012-2017 Sönke Ludwig


Subject to the terms of the MIT license, as written in the included LICENSE.txt file.