bool f_stream_set_timeout(CObjRef stream, int seconds, int microseconds /* = 0 */) { if (stream.getTyped<Socket>(false, true)) { return f_socket_set_option (stream, SOL_SOCKET, SO_RCVTIMEO, CREATE_MAP2("sec", seconds, "usec", microseconds)); } return false; }
bool f_stream_set_timeout(const Resource& stream, int seconds, int microseconds /* = 0 */) { if (stream.getTyped<Socket>(false, true)) { return f_socket_set_option (stream, SOL_SOCKET, SO_RCVTIMEO, make_map_array(s_sec, seconds, s_usec, microseconds)); } return false; }