1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
archived-doc-ja/reference/sockets/functions/socket-send.xml
Yoshinari Takaoka dde73d5c69 Generate sockets methodsynopses based on stubs
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-311.
2021-01-11 12:22:48 +09:00

156 lines
4.7 KiB
XML
Raw Permalink 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: 14dc7c47365f2b71f6c907a5ba5bccf42534d5a9 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: takagi -->
<refentry xml:id="function.socket-send" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>socket_send</refname>
<refpurpose>接続したソケットにデータを送信する</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>int</type><type>false</type></type><methodname>socket_send</methodname>
<methodparam><type>Socket</type><parameter>socket</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam><type>int</type><parameter>length</parameter></methodparam>
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
関数 <function>socket_send</function> は、
<parameter>data</parameter> からソケット <parameter>socket</parameter>
<parameter>length</parameter> バイトのデータを送信します。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>socket</parameter></term>
<listitem>
<para>
<function>socket_create</function> あるいは <function>socket_accept</function>
が作成した有効な <classname>Socket</classname> クラスのインスタンス。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>data</parameter></term>
<listitem>
<para>
リモートホストに送信するデータを含むバッファ。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>length</parameter></term>
<listitem>
<para>
<parameter>data</parameter> からリモートホストに送信するバイト数。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>flags</parameter></term>
<listitem>
<para>
<parameter>flags</parameter> の値は、以下のフラグの任意の組み合わせを
論理 OR 演算子 (<literal>|</literal>) で連結したものとなります。
<table>
<title><parameter>flags</parameter> がとりうる値</title>
<tgroup cols="2">
<tbody>
<row>
<entry><constant>MSG_OOB</constant></entry>
<entry>
OOBout-of-band: 帯域外)データを送信します。
</entry>
</row>
<row>
<entry><constant>MSG_EOR</constant></entry>
<entry>
レコードにマークをつけます。
レコードでデータがそろいます。
</entry>
</row>
<row>
<entry><constant>MSG_EOF</constant></entry>
<entry>
ソケットの送信側を閉じ、そのことを知らせる通知を送信データの最後に付加します。
トランザクションでデータがそろいます。
</entry>
</row>
<row>
<entry><constant>MSG_DONTROUTE</constant></entry>
<entry>
ルータを使用せず、直接つながっているインターフェイスのみを使用します。
</entry>
</row>
</tbody>
</tgroup>
</table>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<function>socket_send</function> は、送信したバイト数あるいはエラー時に &false; を返します。
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&sockets.changelog.socket-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>socket_sendto</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- 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
-->