1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-24 07:12:18 +01:00
Files
archived-doc-tr/reference/sockets/functions/socket-read.xml
2024-12-05 12:02:50 +03:00

148 lines
4.4 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"?>
<!-- EN-Revision: f80105b4fc1196bd8d5fecb98d686b580b1ff65d Maintainer: nilgun Status: ready -->
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.socket-read">
<refnamediv>
<refname>socket_read</refname>
<refpurpose>Bir soketten belli sayıda bayta kadar okuma yapar</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>socket_read</methodname>
<methodparam><type>Socket</type><parameter>soket</parameter></methodparam>
<methodparam><type>int</type><parameter>uzunluk</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>kip</parameter><initializer>PHP_BINARY_READ</initializer></methodparam>
</methodsynopsis>
<para>
<function>socket_create</function> veya
<function>socket_accept</function> işleviyle oluşturulmuş
<parameter>soket</parameter> nesnesinden veri okur.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>soket</parameter></term>
<listitem>
<para>
<function>socket_create</function> veya
<function>socket_accept</function> ile oluşturulmuş geçerli bir
<classname>Socket</classname> nesnesi.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>uzunluk</parameter></term>
<listitem>
<para>
Okunacak azami bayt sayısını belirler. Belirtilmediği takdirde,
okumayı bitirmek için <parameter>kip</parameter> bağımsız değişkenine bağlı
olarak <literal>\r</literal>, <literal>\n</literal> veya
<literal>\0</literal> kullanabilirsiniz (aşağıya bakınız).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>kip</parameter></term>
<listitem>
<para>
Belirtilmesi isteğe bağlı olup şu sabitlerden biri olabilir:
<itemizedlist>
<listitem>
<simpara>
<constant>PHP_BINARY_READ</constant> (Öntanımlı) - Sistemin
<literal>recv()</literal> işlevi kullanılır. İkil veri okumak için
güvenlidir.
</simpara>
</listitem>
<listitem>
<simpara>
<constant>PHP_NORMAL_READ</constant> - Okuma
<literal>\n</literal> veya <literal>\r</literal> karakterinde durur.
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Başarı durumunda veriyi bir dizge olarak döndürür, aksi takdirde &false;
ile döner. Hata kodu <function>socket_last_error</function> işlevi ile
alınabilir. Bu hata kodunu <function>socket_strerror</function> işlevine
aktararak hatayııklayan dizgeyi alabilirsiniz.
</para>
<note>
<para>
<function>socket_read</function> okunacak veri yoksa sıfır uzunlukta bir
dizge ("") döndürür.
</para>
</note>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&sockets.changelog.socket-param;
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>socket_accept</function></member>
<member><function>socket_bind</function></member>
<member><function>socket_connect</function></member>
<member><function>socket_listen</function></member>
<member><function>socket_last_error</function></member>
<member><function>socket_strerror</function></member>
<member><function>socket_write</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
-->