accf_data - buffer incoming connections until data arrives
It prevents the application from receiving the connected descriptor via
accept ();
until data arrives on the connection.
The Fa ACCEPT_FILTER_DATA kernel option is also a module that can be enabled at runtime via kldload(8) if the INET option has been compiled into the kernel.
struct accept_filter_arg afa;
bzero(&afa, sizeof(afa));
strcpy(afa.af_name, "dataready");
setsockopt(sok, SOL_SOCKET, SO_ACCEPTFILTER, &afa, sizeof(afa));
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |