mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 17:10:30 +00:00
Make some more fixes to prod
This commit is contained in:
parent
69bee64a59
commit
da336b3ea8
6 changed files with 90 additions and 28 deletions
|
@ -2038,6 +2038,25 @@ FUNCTIONS
|
|||
`ip` should be an IPv4 address and this defaults to GetClientAddr(),
|
||||
although other interpretations of its meaning are possible.
|
||||
|
||||
Blackhole(ip:uint32)
|
||||
└─→ bool
|
||||
|
||||
Sends IP address to blackholed service.
|
||||
|
||||
ProgramTokenBucket() needs to be called beforehand. The default
|
||||
settings will blackhole automatically, during the accept() loop
|
||||
based on the banned threshold. However if your Lua code calls
|
||||
AcquireToken() manually, then you'll need this function to take
|
||||
action on the returned values.
|
||||
|
||||
This function returns true if a datagram could be sent sucessfully.
|
||||
Otherwise false is returned, which can happen if blackholed isn't
|
||||
running, or if a lot of processes are sending messages to it and the
|
||||
operation would have blocked.
|
||||
|
||||
It's assumed that the blackholed service is running locally in the
|
||||
background.
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────
|
||||
CONSTANTS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue