File: M000036.html

package info (click to toggle)
libfam-ruby 0.2.0-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 360 kB
  • ctags: 122
  • sloc: ansic: 412; ruby: 119; makefile: 7
file content (44 lines) | stat: -rw-r--r-- 1,214 bytes parent folder | download | duplicates (3)
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
41
42
43
44
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>fd (Fam::Connection)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre>/*
 * Get the file descriptor of a Fam::Connection object.
 *
 * Note: This method allows you to wait for FAM events using select()
 * instead of polling via Fam::Connection#pending and
 * Fam::Connection#next_event; see the second example below for more
 * information.
 *
 * Aliases:
 *   Fam::Connection#get_descriptor
 *   Fam::Connection#descriptor
 *   Fam::Connection#get_fd
 *
 * Examples:
 *   # simple use
 *   fd = fam.fd
 *
 *   # wrap the FAM connection descriptor in an IO object for use in a
 *   # select() call
 *   io = IO.new fam.fd, 'r'
 *   select [io], , , 10
 *   
 */
static VALUE fam_conn_fd(VALUE self)
{
  FAMConnection *conn;

  Data_Get_Struct(self, FAMConnection, conn);
  return INT2FIX(FAMCONNECTION_GETFD(conn));
}</pre>
</body>
</html>