Sha256: c4232ac884f1dfb9a667895d5f0e53a90bc87d271f2b2d7a11c1a27205e6c7f8

Contents?: true

Size: 1.04 KB

Versions: 38

Compression:

Stored size: 1.04 KB

Contents

/*
 * Copyright (C) 2007-10 Tony Arcieri
 * You may redistribute this under the terms of the Ruby license.
 * See LICENSE for details
 */

#ifndef COOLIO_H
#define COOLIO_H

#include "ruby.h"
#include "rubyio.h"

#ifdef GetReadFile
#define FPTR_TO_FD(fptr) (fileno(GetReadFile(fptr)))
#else

#if !HAVE_RB_IO_T || (RUBY_VERSION_MAJOR == 1 && RUBY_VERSION_MINOR == 8)
#define FPTR_TO_FD(fptr) fileno(fptr->f)
#else
#define FPTR_TO_FD(fptr) fptr->fd
#endif

#endif

struct Coolio_Event
{
  /* These values are used to extract events from libev callbacks */
  VALUE watcher;
  int revents;
};

struct Coolio_Loop 
{
  struct ev_loop *ev_loop;
  struct ev_timer timer; /* for timeouts */

  int running;
  int events_received;
  int eventbuf_size;
  struct Coolio_Event *eventbuf;
};

struct Coolio_Watcher
{
  union {
    struct ev_io ev_io;
    struct ev_timer ev_timer;
    struct ev_stat ev_stat;
  } event_types;

  int enabled;
  VALUE loop;

  void (*dispatch_callback)(VALUE self, int revents);
};

void Coolio_Loop_process_event(VALUE watcher, int revents);

#endif

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
cool.io-1.6.0-x64-mingw32 ext/cool.io/cool.io.h
cool.io-1.6.0-x86-mingw32 ext/cool.io/cool.io.h
cool.io-1.6.0 ext/cool.io/cool.io.h
cool.io-1.5.4-x64-mingw32 ext/cool.io/cool.io.h
cool.io-1.5.4-x86-mingw32 ext/cool.io/cool.io.h
cool.io-1.5.4 ext/cool.io/cool.io.h
cool.io-1.5.3-x86-mingw32 ext/cool.io/cool.io.h
cool.io-1.5.3-x64-mingw32 ext/cool.io/cool.io.h
cool.io-1.5.3 ext/cool.io/cool.io.h
cool.io-1.5.2 ext/cool.io/cool.io.h
cool.io-1.5.1 ext/cool.io/cool.io.h
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/cool.io-1.5.0/ext/cool.io/cool.io.h
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/cool.io-1.5.0/ext/cool.io/cool.io.h
cool.io-1.5.0 ext/cool.io/cool.io.h
cool.io-1.4.6-x86-mingw32 ext/cool.io/cool.io.h
cool.io-1.4.6-x64-mingw32 ext/cool.io/cool.io.h
cool.io-1.4.6 ext/cool.io/cool.io.h
cool.io-1.4.5 ext/cool.io/cool.io.h
cool.io-1.4.5-x86-mingw32 ext/cool.io/cool.io.h
cool.io-1.4.5-x64-mingw32 ext/cool.io/cool.io.h