GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
io_fd_canwrite(3) FreeBSD Library Functions Manual io_fd_canwrite(3)

io_fd_canwrite - prepare descriptor for io_wait

#include <libowfat/io.h>

int io_fd(int64 fd); int io_fd_canwrite(int64 fd);

io_fd_canwrite is just like io_fd, except that it assumes the descriptor is writable, which may save a syscall or two. This assumption is true in most cases, because the kernel buffers writes. Noteworthy cases in which you need to use io_fd instead of io_fd_canwrite are unconnected sockets, i.e. when you queued a non-blocking connect() and want to ask for writability to get notified when it went through.

It is OK to call this function on a descriptor that io_fd() has already been called on.

io_fd_canwrite returns 1 on success, 0 on error.

io_wait(3), io_wantread(3), io_canread(3), io_eagain(3), io_nonblock(3), io_fd(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.