kgio.git  about / heads / tags
kinder, gentler I/O for Ruby
blob 78445e381d0da941f10eec652c3fff335e7cbbf7 701 bytes (raw)
$ git show v2.1.1:ext/kgio/kgio.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
#ifndef KGIO_H
#define KGIO_H

#include <ruby.h>
#ifdef HAVE_RUBY_IO_H
#  include <ruby/io.h>
#else
#  include <rubyio.h>
#endif
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <assert.h>

#include "missing/ancient_ruby.h"
#include "nonblock.h"
#include "my_fileno.h"

struct io_args {
	VALUE io;
	VALUE buf;
	char *ptr;
	long len;
	int fd;
};

void init_kgio_wait(void);
void init_kgio_read_write(void);
void init_kgio_accept(void);
void init_kgio_connect(void);

VALUE kgio_call_wait_writable(VALUE io);
VALUE kgio_call_wait_readable(VALUE io);

#endif /* KGIO_H */

git clone git://yhbt.net/kgio.git
git clone https://yhbt.net/kgio.git