<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.fileprocess.process.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'book.ev.php',
    1 => 'Ev',
    2 => 'Ev',
  ),
  'up' => 
  array (
    0 => 'refs.fileprocess.process.php',
    1 => 'プロセス制御',
  ),
  'prev' => 
  array (
    0 => 'function.eio-write.php',
    1 => 'eio_write',
  ),
  'next' => 
  array (
    0 => 'ev.setup.php',
    1 => 'インストール/設定',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/ev/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.ev.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.ev" class="book">
 
 <h1 class="title">Ev</h1>
 
 <div id="intro.ev" class="preface">
  <h1 class="title">はじめに</h1>
  <p class="simpara">
   この拡張モジュールは、
   <a href="http://software.schmorp.de/pkg/libev.html" class="link external">&raquo;&nbsp;libev</a> ライブラリへのインターフェイスを提供します。
   このライブラリは、C で書かれたハイパフォーマンスで高機能なイベントループです。
  </p>

  <blockquote class="note"><p><strong class="note">注意</strong>: <span class="simpara">この拡張モジュールは Windows
環境では利用できません。</span></p></blockquote>

 <p class="simpara">
   <em>Libev</em>
   はイベントループです。何か興味のあるイベント
   (ファイルディスクリプタが読み込み可能になった、あるいはタイムアウトが発生したなど)
   を登録すると、そのイベントの発生元を管理してプログラムにイベントを提供します。
  </p>
  <p class="simpara">
   そのためには、イベントループハンドラを実行して
   プロセス (あるいはスレッド) を完全に制御する必要があります。
   イベントとの通信には、コールバックの仕組みを利用します。
  </p>
  <p class="simpara">
   興味のあるイベントを登録するには、イベントウォッチャーを登録します。
   そして、ウォッチャーを開始して libev に手渡します。
  </p>
  <p class="simpara">
   詳細は
   <a href="http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod" class="link external">&raquo;&nbsp;
   libev のドキュメント</a> を参照ください。
  </p>
 </div>

 





 





 





 





 






 





 





 





 





 





 




 




 




 




 





 




 




 




 





<ul class="chunklist chunklist_book"><li><a href="ev.setup.php">インストール/設定</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="ev.requirements.php">要件</a></li><li><a href="ev.installation.php">インストール手順</a></li></ul></li><li><a href="ev.examples.php">例</a></li><li><a href="ev.watchers.php">ウォッチャー</a></li><li><a href="ev.watcher-callbacks.php">ウォッチャーのコールバック</a></li><li><a href="ev.periodic-modes.php">Periodic ウォッチャーの操作モード</a></li><li><a href="class.ev.php">Ev</a> — Ev クラス<ul class="chunklist chunklist_book chunklist_children"><li><a href="ev.backend.php">Ev::backend</a> — libev が使うバックエンドを表す整数値を返す</li><li><a href="ev.depth.php">Ev::depth</a> — 再帰の深さを返す</li><li><a href="ev.embeddablebackends.php">Ev::embeddableBackends</a> — 他のイベントループに埋め込めるバックエンド群を返す</li><li><a href="ev.feedsignal.php">Ev::feedSignal</a> — シグナルイベントを Ev に送る</li><li><a href="ev.feedsignalevent.php">Ev::feedSignalEvent</a> — シグナルイベントの情報をデフォルトループに送る</li><li><a href="ev.iteration.php">Ev::iteration</a> — デフォルトのイベントループが新しいイベントをポーリングした回数を返す</li><li><a href="ev.now.php">Ev::now</a> — デフォルトのイベントループで直近の処理が始まった時刻を返す</li><li><a href="ev.nowupdate.php">Ev::nowUpdate</a> — カーネルに問い合わせて現在時刻を確認し、処理中の Ev::now が返す時刻を更新する</li><li><a href="ev.recommendedbackends.php">Ev::recommendedBackends</a> — 現在のプラットフォーム上でおすすめのバックエンドのビットマスクを返す</li><li><a href="ev.resume.php">Ev::resume</a> — 一時停止していたデフォルトのイベントループを再開させる</li><li><a href="ev.run.php">Ev::run</a> — イベントのチェックとデフォルトループのコールバックの呼び出しを開始する</li><li><a href="ev.sleep.php">Ev::sleep</a> — 指定した秒数だけプロセスをブロックする</li><li><a href="ev.stop.php">Ev::stop</a> — デフォルトのイベントループを止める</li><li><a href="ev.supportedbackends.php">Ev::supportedBackends</a> — 現在の libev の構成でサポートするバックエンド群を返す</li><li><a href="ev.suspend.php">Ev::suspend</a> — デフォルトのイベントループを一時停止する</li><li><a href="ev.time.php">Ev::time</a> — epoch から現在時刻までの秒数を返す</li><li><a href="ev.verify.php">Ev::verify</a> — 内部の整合性をチェックする (デバッグ用)</li></ul></li><li><a href="class.evcheck.php">EvCheck</a> — EvCheck クラス<ul class="chunklist chunklist_book chunklist_children"><li><a href="evcheck.construct.php">EvCheck::__construct</a> — EvCheck ウォッチャーオブジェクトを作る</li><li><a href="evcheck.createstopped.php">EvCheck::createStopped</a> — 停止した EvCheck ウォッチャーのインスタンスを作る</li></ul></li><li><a href="class.evchild.php">EvChild</a> — The EvChild class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evchild.construct.php">EvChild::__construct</a> — EvChild ウォッチャーオブジェクトを作る</li><li><a href="evchild.createstopped.php">EvChild::createStopped</a> — 停止した EvChild ウォッチャーのインスタンスを作る</li><li><a href="evchild.set.php">EvChild::set</a> — ウォッチャーを設定する</li></ul></li><li><a href="class.evembed.php">EvEmbed</a> — EvEmbed クラス<ul class="chunklist chunklist_book chunklist_children"><li><a href="evembed.construct.php">EvEmbed::__construct</a> — EvEmbed オブジェクトを作る</li><li><a href="evembed.createstopped.php">EvEmbed::createStopped</a> — 停止した EvEmbed ウォッチャーのインスタンスを作る</li><li><a href="evembed.set.php">EvEmbed::set</a> — ウォッチャーを設定する</li><li><a href="evembed.sweep.php">EvEmbed::sweep</a> — 埋め込んだループに対して単一の非ブロックスイープを行う</li></ul></li><li><a href="class.evfork.php">EvFork</a> — EvFork クラス<ul class="chunklist chunklist_book chunklist_children"><li><a href="evfork.construct.php">EvFork::__construct</a> — EvFork ウォッチャーオブジェクトを作る</li><li><a href="evfork.createstopped.php">EvFork::createStopped</a> — 停止した EvFork ウォッチャーのインスタンスを作る</li></ul></li><li><a href="class.evidle.php">EvIdle</a> — The EvIdle class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evidle.construct.php">EvIdle::__construct</a> — Constructs the EvIdle watcher object</li><li><a href="evidle.createstopped.php">EvIdle::createStopped</a> — Creates instance of a stopped EvIdle watcher object</li></ul></li><li><a href="class.evio.php">EvIo</a> — The EvIo class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evio.construct.php">EvIo::__construct</a> — Constructs EvIo watcher object</li><li><a href="evio.createstopped.php">EvIo::createStopped</a> — Create stopped EvIo watcher object</li><li><a href="evio.set.php">EvIo::set</a> — Configures the watcher</li></ul></li><li><a href="class.evloop.php">EvLoop</a> — The EvLoop class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evloop.backend.php">EvLoop::backend</a> — Returns an integer describing the backend used by libev</li><li><a href="evloop.check.php">EvLoop::check</a> — Creates EvCheck object associated with the current event loop
  instance</li><li><a href="evloop.child.php">EvLoop::child</a> — Creates EvChild object associated with the current event loop</li><li><a href="evloop.construct.php">EvLoop::__construct</a> — Constructs the event loop object</li><li><a href="evloop.defaultloop.php">EvLoop::defaultLoop</a> — Returns or creates the default event loop</li><li><a href="evloop.embed.php">EvLoop::embed</a> — Creates an instance of EvEmbed watcher associated
  with the current EvLoop object</li><li><a href="evloop.fork.php">EvLoop::fork</a> — Creates EvFork watcher object associated with the current event
  loop instance</li><li><a href="evloop.idle.php">EvLoop::idle</a> — Creates EvIdle watcher object associated with the current event
  loop instance</li><li><a href="evloop.invokepending.php">EvLoop::invokePending</a> — Invoke all pending watchers while resetting their pending state</li><li><a href="evloop.io.php">EvLoop::io</a> — Create EvIo watcher object associated with the current event
  loop instance</li><li><a href="evloop.loopfork.php">EvLoop::loopFork</a> — Must be called after a fork</li><li><a href="evloop.now.php">EvLoop::now</a> — Returns the current &quot;event loop time&quot;</li><li><a href="evloop.nowupdate.php">EvLoop::nowUpdate</a> — Establishes the current time by querying the kernel, updating the time
    returned by EvLoop::now in the progress</li><li><a href="evloop.periodic.php">EvLoop::periodic</a> — Creates EvPeriodic watcher object associated with the current
  event loop instance</li><li><a href="evloop.prepare.php">EvLoop::prepare</a> — Creates EvPrepare watcher object associated with the current
  event loop instance</li><li><a href="evloop.resume.php">EvLoop::resume</a> — Resume previously suspended default event loop</li><li><a href="evloop.run.php">EvLoop::run</a> — Begin checking for events and calling callbacks for the loop</li><li><a href="evloop.signal.php">EvLoop::signal</a> — Creates EvSignal watcher object associated with the current
  event loop instance</li><li><a href="evloop.stat.php">EvLoop::stat</a> — Creates EvStat watcher object associated with the current event
  loop instance</li><li><a href="evloop.stop.php">EvLoop::stop</a> — Stops the event loop</li><li><a href="evloop.suspend.php">EvLoop::suspend</a> — Suspend the loop</li><li><a href="evloop.timer.php">EvLoop::timer</a> — Creates EvTimer watcher object associated with the current event
  loop instance</li><li><a href="evloop.verify.php">EvLoop::verify</a> — Performs internal consistency checks(for debugging)</li></ul></li><li><a href="class.evperiodic.php">EvPeriodic</a> — The EvPeriodic class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evperiodic.again.php">EvPeriodic::again</a> — Simply stops and restarts the periodic watcher again</li><li><a href="evperiodic.at.php">EvPeriodic::at</a> — Returns the absolute time that this
  watcher is supposed to trigger next</li><li><a href="evperiodic.construct.php">EvPeriodic::__construct</a> — Constructs EvPeriodic watcher object</li><li><a href="evperiodic.createstopped.php">EvPeriodic::createStopped</a> — Create a stopped EvPeriodic watcher</li><li><a href="evperiodic.set.php">EvPeriodic::set</a> — Configures the watcher</li></ul></li><li><a href="class.evprepare.php">EvPrepare</a> — EvPrepare クラス<ul class="chunklist chunklist_book chunklist_children"><li><a href="evprepare.construct.php">EvPrepare::__construct</a> — EvPrepare ウォッチャーオブジェクトを作る</li><li><a href="evprepare.createstopped.php">EvPrepare::createStopped</a> — 停止した EvPrepare ウォッチャーのインスタンスを作る</li></ul></li><li><a href="class.evsignal.php">EvSignal</a> — The EvSignal class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evsignal.construct.php">EvSignal::__construct</a> — Constructs EvSignal watcher object</li><li><a href="evsignal.createstopped.php">EvSignal::createStopped</a> — Create stopped EvSignal watcher object</li><li><a href="evsignal.set.php">EvSignal::set</a> — Configures the watcher</li></ul></li><li><a href="class.evstat.php">EvStat</a> — The EvStat class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evstat.attr.php">EvStat::attr</a> — Returns the values most recently detected by Ev</li><li><a href="evstat.construct.php">EvStat::__construct</a> — Constructs EvStat watcher object</li><li><a href="evstat.createstopped.php">EvStat::createStopped</a> — Create a stopped EvStat watcher object</li><li><a href="evstat.prev.php">EvStat::prev</a> — Returns the previous set of values returned by EvStat::attr</li><li><a href="evstat.set.php">EvStat::set</a> — Configures the watcher</li><li><a href="evstat.stat.php">EvStat::stat</a> — Initiates the stat call</li></ul></li><li><a href="class.evtimer.php">EvTimer</a> — The EvTimer class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evtimer.again.php">EvTimer::again</a> — Restarts the timer watcher</li><li><a href="evtimer.construct.php">EvTimer::__construct</a> — Constructs an EvTimer watcher object</li><li><a href="evtimer.createstopped.php">EvTimer::createStopped</a> — Creates EvTimer stopped watcher object</li><li><a href="evtimer.set.php">EvTimer::set</a> — Configures the watcher</li></ul></li><li><a href="class.evwatcher.php">EvWatcher</a> — The EvWatcher class<ul class="chunklist chunklist_book chunklist_children"><li><a href="evwatcher.clear.php">EvWatcher::clear</a> — Clear watcher pending status</li><li><a href="evwatcher.construct.php">EvWatcher::__construct</a> — Abstract constructor of a watcher object</li><li><a href="evwatcher.feed.php">EvWatcher::feed</a> — Feeds the given revents set into the event loop</li><li><a href="evwatcher.getloop.php">EvWatcher::getLoop</a> — Returns the loop responsible for the watcher</li><li><a href="evwatcher.invoke.php">EvWatcher::invoke</a> — Invokes the watcher callback with the given received events bit
  mask</li><li><a href="evwatcher.keepalive.php">EvWatcher::keepalive</a> — Configures whether to keep the loop from returning</li><li><a href="evwatcher.setcallback.php">EvWatcher::setCallback</a> — Sets new callback for the watcher</li><li><a href="evwatcher.start.php">EvWatcher::start</a> — Starts the watcher</li><li><a href="evwatcher.stop.php">EvWatcher::stop</a> — Stops the watcher</li></ul></li></ul></div><?php manual_footer($setup); ?>