1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-27 00:22:08 +01:00
Files
archived-doc-ja/reference/stream/constants.xml
Yoshinari Takaoka 2938da1363 例外は「投げる」ではなく、「スローする」に統一
これは決めの問題だが、私も含めて、「スローする」派が圧倒的に優勢だったので、そちらに倒す。
2022-11-12 15:55:49 +09:00

436 lines
18 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: aab33d644359aba597e810e2fc0c0caa0d347c9c Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi,mumumu -->
<appendix xml:id="stream.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.constants;
&extension.constants;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>定数</entry>
<entry>説明</entry>
</row>
</thead>
<tbody>
<row xml:id="constant.stream-filter-read">
<entry><constant>STREAM_FILTER_READ</constant></entry>
<entry>
<function>stream_filter_append</function> または
<function>stream_filter_prepend</function> と共に使われます。
指定されたフィルタが <emphasis>読み込みのときのみ</emphasis>
適用されることを示します。
</entry>
</row>
<row xml:id="constant.stream-filter-write">
<entry><constant>STREAM_FILTER_WRITE</constant></entry>
<entry>
<function>stream_filter_append</function> または
<function>stream_filter_prepend</function> と共に使われます。
指定されたフィルタが <emphasis>書き込みのときのみ</emphasis>
適用されることを示します。
</entry>
</row>
<row xml:id="constant.stream-filter-all">
<entry><constant>STREAM_FILTER_ALL</constant></entry>
<entry>
この定数は右の値と等価です:
<literal>STREAM_FILTER_READ |
STREAM_FILTER_WRITE</literal>
</entry>
</row>
<row xml:id="constant.psfs-pass-on">
<entry><constant>PSFS_PASS_ON</constant></entry>
<entry><literal>返値</literal>: ユーザー空間のフィルタが
バケットを <parameter>$out</parameter> に返したことを
示します。
</entry>
</row>
<row xml:id="constant.psfs-feed-me">
<entry><constant>PSFS_FEED_ME</constant></entry>
<entry><literal>返値</literal>: ユーザー空間のフィルタが
<parameter>$out</parameter> にバケットを返さなかったことを
示します。(つまり、変換されたデータを返す用意ができていないという
ことです。)
</entry>
</row>
<row xml:id="constant.psfs-err-fatal">
<entry><constant>PSFS_ERR_FATAL</constant> *</entry>
<entry><literal>返値</literal>: ユーザー空間のフィルタにおいて、
復旧不可能なエラーが発生したことを示します。
(つまり、不正なデータを受け取ったということです。)
</entry>
</row>
<row xml:id="constant.psfs-flag-normal">
<entry><constant>PSFS_FLAG_NORMAL</constant></entry>
<entry>通常の読み書き。</entry>
</row>
<row xml:id="constant.psfs-flag-flush-inc">
<entry><constant>PSFS_FLAG_FLUSH_INC</constant></entry>
<entry>インクリメンタルなフラッシュ。</entry>
</row>
<row xml:id="constant.psfs-flag-flush-close">
<entry><constant>PSFS_FLAG_FLUSH_CLOSE</constant></entry>
<entry>最後に閉じる前にフラッシュ。</entry>
</row>
<row xml:id="constant.stream-use-path">
<entry><constant>STREAM_USE_PATH</constant></entry>
<entry><literal>フラグ</literal>: <literal>stream</literal>
include_path を使ったかどうかを示します。
</entry>
</row>
<row xml:id="constant.stream-report-errors">
<entry><constant>STREAM_REPORT_ERRORS</constant></entry>
<entry><literal>フラグ</literal>: ストリームを開く際に、
ユーザー空間にある <literal>wrapper</literal> の側で、
<function>trigger_error</function> を使ってエラーを発生させるかどうかを
示します。もし、このフラグがセットされていない場合は、
ユーザーの側でエラーをスローしてはいけません。
</entry>
</row>
<row xml:id="constant.stream-client-async-connect">
<entry><constant>STREAM_CLIENT_ASYNC_CONNECT</constant></entry>
<entry>非同期的にソケットを開きます。このオプションは、
<constant>STREAM_CLIENT_CONNECT</constant> フラグとともに使用する
必要があります。
<function>stream_socket_client</function> と共に使われます。
</entry>
</row>
<row xml:id="constant.stream-client-connect">
<entry><constant>STREAM_CLIENT_CONNECT</constant></entry>
<entry>クライアントソケット接続を開きます。クライアントソケットは
常にこのフラグを含んでいる必要があります。
<function>stream_socket_client</function> と共に使われます。
</entry>
</row>
<row xml:id="constant.stream-client-persistent">
<entry><constant>STREAM_CLIENT_PERSISTENT</constant></entry>
<entry><function>stream_socket_client</function>を使って
開かれたソケットが、セッションをまたいでも保持されるよう
指示します。
</entry>
</row>
<row xml:id="constant.stream-server-bind">
<entry><constant>STREAM_SERVER_BIND</constant></entry>
<entry><function>stream_socket_server</function> で開かれたソケットが
特定のターゲットに関連付けられることを示します。
サーバーソケットには常にこのフラグが与えられているはずです。
</entry>
</row>
<row xml:id="constant.stream-server-listen">
<entry><constant>STREAM_SERVER_LISTEN</constant></entry>
<entry><function>stream_socket_server</function> で開かれ、
<constant>STREAM_SERVER_BIND</constant> によってターゲットに
関連付けられたストリームに、ソケットに対して接続待ちを開始するよう
指示します。
接続指向の転送TCP のような)はこのフラグを使用する必要があります。
それ以外の場合はサーバーソケットが有効になりません。
このフラグを非接続指向の転送UDP のような)に使用するとエラーになります。
</entry>
</row>
<row xml:id="constant.stream-notify-resolve">
<entry><constant>STREAM_NOTIFY_RESOLVE</constant></entry>
<entry>
該当するストリームにおいて、リクエストされたリモートのドメイン名の
解決に成功したか、失敗したことを示します。
このとき、何が起こっているかについては、
<parameter>severity</parameter> を参照ください。
</entry>
</row>
<row xml:id="constant.stream-notify-connect">
<entry><constant>STREAM_NOTIFY_CONNECT</constant></entry>
<entry>
外部のリソースへの接続が確立されたことを示します。
</entry>
</row>
<row xml:id="constant.stream-notify-auth-required">
<entry><constant>STREAM_NOTIFY_AUTH_REQUIRED</constant></entry>
<entry>
指定されたリソースにアクセスするためには、さらに認証情報が必要です。
通常に、<constant>STREAM_NOTIFY_SEVERITY_ERR</constant>
<parameter>severity</parameter> (深刻度) と共に通知されます。
</entry>
</row>
<row xml:id="constant.stream-notify-mime-type-is">
<entry><constant>STREAM_NOTIFY_MIME_TYPE_IS</constant></entry>
<entry>
リソースの <literal>mime タイプ</literal> が確認されました。
どのタイプと判定されたかについては、<parameter>message</parameter>
を見てください。
</entry>
</row>
<row xml:id="constant.stream-notify-file-size-is">
<entry><constant>STREAM_NOTIFY_FILE_SIZE_IS</constant></entry>
<entry>
確認されたリソースの<literal>サイズ</literal>を表します。
</entry>
</row>
<row xml:id="constant.stream-notify-redirected">
<entry><constant>STREAM_NOTIFY_REDIRECTED</constant></entry>
<entry>
外部リソースへのアクセスは、別の場所にリダイレクトされました。
詳細を知るには、<parameter>message</parameter> を調べてみてください。
</entry>
</row>
<row xml:id="constant.stream-notify-progress">
<entry><constant>STREAM_NOTIFY_PROGRESS</constant></entry>
<entry>
ストリームにおける転送の進捗が、
<parameter>bytes_transferred</parameter> または、場合によっては
<parameter>bytes_max</parameter> に現れていることを示します。
</entry>
</row>
<row xml:id="constant.stream-notify-completed">
<entry><constant>STREAM_NOTIFY_COMPLETED</constant></entry>
<entry>
これ以上ストリームにデータがないことを示します。
</entry>
</row>
<row xml:id="constant.stream-notify-failure">
<entry><constant>STREAM_NOTIFY_FAILURE</constant></entry>
<entry>
ストリームにおいて一般的なエラーが発生したことを示します。
エラーの詳細については、
<parameter>message</parameter><parameter>message_code</parameter>
を調べてみてください。
</entry>
</row>
<row xml:id="constant.stream-notify-auth-result">
<entry><constant>STREAM_NOTIFY_AUTH_RESULT</constant></entry>
<entry>
認証が完了した(成功または失敗した)ことを示します。
</entry>
</row>
<row xml:id="constant.stream-notify-severity-info">
<entry><constant>STREAM_NOTIFY_SEVERITY_INFO</constant></entry>
<entry>
正常な状態における、エラーでない通知があることを示します。
</entry>
</row>
<row xml:id="constant.stream-notify-severity-warn">
<entry><constant>STREAM_NOTIFY_SEVERITY_WARN</constant></entry>
<entry>
致命的でないエラーが発生したことを示します。処理は継続されます。
</entry>
</row>
<row xml:id="constant.stream-notify-severity-err">
<entry><constant>STREAM_NOTIFY_SEVERITY_ERR</constant></entry>
<entry>
致命的なエラーが発生したことを示します。処理は中断されます。
</entry>
</row>
<row xml:id="constant.stream-ipproto-icmp">
<entry><constant>STREAM_IPPROTO_ICMP</constant> +</entry>
<entry>
ICMP ソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-ipproto-ip">
<entry><constant>STREAM_IPPROTO_IP</constant> +</entry>
<entry>
IP ソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-ipproto-raw">
<entry><constant>STREAM_IPPROTO_RAW</constant> +</entry>
<entry>
RAW ソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-ipproto-tcp">
<entry><constant>STREAM_IPPROTO_TCP</constant> +</entry>
<entry>
TCP ソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-ipproto-udp">
<entry><constant>STREAM_IPPROTO_UDP</constant> +</entry>
<entry>
UDP ソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-pf-inet">
<entry><constant>STREAM_PF_INET</constant> +</entry>
<entry>
Internet Protocol バージョン 4IPv4です。
</entry>
</row>
<row xml:id="constant.stream-pf-inet6">
<entry><constant>STREAM_PF_INET6</constant> +</entry>
<entry>
Internet Protocol バージョン 6IPv6です。
</entry>
</row>
<row xml:id="constant.stream-pf-unix">
<entry><constant>STREAM_PF_UNIX</constant> +</entry>
<entry>
Unix システムの内部プロトコルです。
</entry>
</row>
<row xml:id="constant.stream-sock-dgram">
<entry><constant>STREAM_SOCK_DGRAM</constant> +</entry>
<entry>
データグラムを提供します。これはコネクションレスのメッセージ
(例: UDPです。
</entry>
</row>
<row xml:id="constant.stream-sock-raw">
<entry><constant>STREAM_SOCK_RAW</constant> +</entry>
<entry>
raw ソケットを提供します。これは内部のネットワークプロトコルや
インターフェイスへのアクセス機能を提供します。通常、この形式の
ソケットは root ユーザーが使用します。
</entry>
</row>
<row xml:id="constant.stream-sock-rdm">
<entry><constant>STREAM_SOCK_RDM</constant> +</entry>
<entry>
RDMReliably-delivered messagesソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-sock-seqpacket">
<entry><constant>STREAM_SOCK_SEQPACKET</constant> +</entry>
<entry>
シーケンシャルパケットストリームソケットを提供します。
</entry>
</row>
<row xml:id="constant.stream-sock-stream">
<entry><constant>STREAM_SOCK_STREAM</constant> +</entry>
<entry>
帯域外データを転送するための、シーケンシャルで双方向の
バイトストリーム(例: TCPを提供します。
</entry>
</row>
<row xml:id="constant.stream-shut-rd">
<entry><constant>STREAM_SHUT_RD</constant></entry>
<entry>
<function>stream_socket_shutdown</function> で使用し、
それ以降の受信を無効にします。
</entry>
</row>
<row xml:id="constant.stream-shut-wr">
<entry><constant>STREAM_SHUT_WR</constant></entry>
<entry>
<function>stream_socket_shutdown</function> で使用し、
それ以降の送信を無効にします。
</entry>
</row>
<row xml:id="constant.stream-shut-rdwr">
<entry><constant>STREAM_SHUT_RDWR</constant></entry>
<entry>
<function>stream_socket_shutdown</function> で使用し、
それ以降の送受信を無効にします。
</entry>
</row>
<row xml:id="constant.stream-cast-for-select">
<entry><constant>STREAM_CAST_FOR_SELECT</constant></entry>
<entry>
<function>stream_select</function>
<function>stream_cast</function> をコールしている場合のストリームのキャスト。
</entry>
</row>
<row xml:id="constant.stream-cast-as-stream">
<entry><constant>STREAM_CAST_AS_STREAM</constant></entry>
<entry>
<function>stream_cast</function>
が他からコールされた (上記参照) 場合のストリームのキャスト。
</entry>
</row>
<row xml:id="constant.stream-meta-touch">
<entry><constant>STREAM_META_TOUCH</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>touch</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-meta-owner">
<entry><constant>STREAM_META_OWNER</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>chown</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-meta-owner-name">
<entry><constant>STREAM_META_OWNER_NAME</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>chown</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-meta-group">
<entry><constant>STREAM_META_GROUP</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>chgrp</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-meta-group-name">
<entry><constant>STREAM_META_GROUP_NAME</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>chgrp</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-meta-access">
<entry><constant>STREAM_META_ACCESS</constant></entry>
<entry>
<function>stream_metadata</function> と組み合わせて使い、<function>chmod</function> のコールを指定します。
</entry>
</row>
<row xml:id="constant.stream-buffer-none">
<entry><constant>STREAM_BUFFER_NONE</constant></entry>
<entry>
バッファリングを行いません。
</entry>
</row>
<row xml:id="constant.stream-buffer-line">
<entry><constant>STREAM_BUFFER_LINE</constant></entry>
<entry>
行単位のバッファリングを行います。
</entry>
</row>
<row xml:id="constant.stream-buffer-full">
<entry><constant>STREAM_BUFFER_FULL</constant></entry>
<entry>
全てをバッファリングします。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<note>
<simpara>
<literal>+</literal> がつけられている定数は
<function>stream_socket_pair</function> とともに使用することが想定されています。
これらの定数の中にはあなたのシステムでは使用できないものがあるかもしれない
ことに注意してください。
</simpara>
</note>
<note>
<simpara>
<constant>STREAM_META_*</constant> 定数は
<function>stream_metadata</function> とともに使用することが想定されています。
</simpara>
</note>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->