You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
.TH io_getcookie 3
io_getcookie \- retrieve cookie
.B #include <io.h>
void* \fBio_getcookie\fP(int64 fd);
io_getcookie retrieves a cookie (pointer to some anonymous data
structure you associated with this descriptor).
Use io_setcookie(3) to associate a cookie with a descriptor.
If you did not associate a cookie with this descriptor, io_getcookie
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.
.SH "SEE ALSO"