/*
* call-seq:
*
* io.kgio_autopush = true
* io.kgio_autopush = false
*
* Enables or disables autopush on any given Kgio::SocketMethods-capable
* IO object. This does NOT enable or disable TCP_NOPUSH/TCP_CORK right
* away, that must be done with IO.setsockopt
*
* Only available on systems with TCP_CORK (Linux) or
* TCP_NOPUSH (FreeBSD, and maybe other *BSDs).
*/
static VALUE autopush_set(VALUE io, VALUE vbool)
{
if (RTEST(vbool))
state_set(io, AUTOPUSH_STATE_WRITER);
else
state_set(io, AUTOPUSH_STATE_IGNORE);
return vbool;
}