debian man page for io_setcookie

Query: io_setcookie

OS: debian

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

io_setcookie(3) 					     Library Functions Manual						   io_setcookie(3)

NAME
io_setcookie - associate cookie with descriptor
SYNTAX
#include <io.h> void io_setcookie(int64 fd,void* cookie);
DESCRIPTION
io_setcookie associates a cookie (pointer to some anonymous data structure) with this descriptor. Only one cookie can be associated with a descriptor. Use io_getcookie(3) to retrieve the cookie for a descriptor (usually after io_canread or io_canwrite brought it to your attention). Please note that io_close does not deallocate your cookie. You need to do that yourself. The idea is that you put the state associated with a TCP connection you serve in a common struct. Then you do not need to have your own data structure to retrieve the state for a connection, you can just use the data structure io_wait already maintains. The lookup works in constant time and should not cause any cache misses.
SEE ALSO
io_wait(3), io_getcookie(3) io_setcookie(3)
Related Man Pages
xgeteventdata(3) - debian
io_wait(3) - debian
xgeteventdata(3) - centos
session_get_cookie_params(3) - php
mojo::cookie::response(3pm) - debian
Similar Topics in the Unix Linux Community
Adding the individual columns of a matrix.
awk or sed - Convert 2 lines to 1 line
Introduction
How to copy a column of multiple files and paste into new excel file (next to column)?