validate_accept

March 26, 2020

Name

validate_accept

Synopsis

#include "hooks/core/validate_accept.h"

| int **validate_accept** ( | closure, |   |
|   | ac, |   |
|   | c); |   |

void * <var class="pdparam">closure</var>;
accept_construct * <var class="pdparam">ac</var>;
validate_context * <var class="pdparam">c</var>;

| int **has_core_validate_accept_hook** ( | ); |   |

| void **register_core_validate_accept_hook_first** ( | hook, |   |
|   | closure); |   |

ec_hook_core_validate_accept_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| void **register_core_validate_accept_hook_last** ( | hook, |   |
|   | closure); |   |

ec_hook_core_validate_accept_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;

| int **call_core_validate_accept_hook** ( | ac, |   |
|   | c); |   |

accept_construct * <var class="pdparam">ac</var>;
validate_context * <var class="pdparam">c</var>;

Description

Similar in purpose to validate_connect, this hook allows a module to do something at accept time, prior to running the usual connect time hooks. This may mean that the hook implmentor is called from a non-scheduler thread, in which case the underlying descriptor will be set to blocking mode.