Sha256: 432d6fceec534e17bce2223b7bbbb90f6c2cf3480eea84135923cc99b33ad7f7

Contents?: true

Size: 1 KB

Versions: 14

Compression:

Stored size: 1 KB

Contents

/*
 * Copyright (c) 2011 Tony Arcieri. Distributed under the MIT License. See
 * LICENSE.txt for further details.
 */

#ifndef NIO4R_H
#define NIO4R_H

#include "libev.h"
#include "ruby.h"
#include "ruby/io.h"

struct NIO_Selector {
    struct ev_loop *ev_loop;
    struct ev_timer timer; /* for timeouts */
    struct ev_io wakeup;

    int ready_count;
    int closed, selecting;
    int wakeup_reader, wakeup_writer;
    volatile int wakeup_fired;

    VALUE ready_array;
};

struct NIO_callback_data {
    VALUE *monitor;
    struct NIO_Selector *selector;
};

struct NIO_Monitor {
    VALUE self;
    int interests, revents;
    struct ev_io ev_io;
    struct NIO_Selector *selector;
};

struct NIO_ByteBuffer {
    char *buffer;
    int position, limit, capacity, mark;
};

struct NIO_Selector *NIO_Selector_unwrap(VALUE selector);

/* Thunk between libev callbacks in NIO::Monitors and NIO::Selectors */
void NIO_Selector_monitor_callback(struct ev_loop *ev_loop, struct ev_io *io, int revents);

#endif /* NIO4R_H */

Version data entries

14 entries across 13 versions & 6 rubygems

Version Path
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/nio4r-2.7.4/ext/nio4r/nio4r.h
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
minato_ruby_api_client-0.2.2 vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
nio4r-2.7.4-java ext/nio4r/nio4r.h
nio4r-2.7.4 ext/nio4r/nio4r.h
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/nio4r-2.7.3/ext/nio4r/nio4r.h
nio4r-2.7.1-java ext/nio4r/nio4r.h
nio4r-2.7.1 ext/nio4r/nio4r.h
nio4r-2.7.0-java ext/nio4r/nio4r.h
nio4r-2.7.0 ext/nio4r/nio4r.h