mirror of
https://github.com/php/doc-de.git
synced 2026-03-29 01:32:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@93843 c90b9560-bf6c-de11-be94-00142212c4b1
81 lines
2.3 KiB
XML
81 lines
2.3 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<!-- splitted from ./de/functions/network.xml, last change in rev 1.11 -->
|
|
<!-- last change to 'socket-set-timeout' in en/ tree in rev 1.18 -->
|
|
<!-- EN-Revision: 1.2 Maintainer: tschuer Status: ready -->
|
|
<!-- OLD-Revision: 1.26/EN.1.18 -->
|
|
<refentry id="function.socket-set-timeout">
|
|
<refnamediv>
|
|
<refname>socket_set_timeout</refname>
|
|
<refpurpose>Setzt den Timeout-Wert eines Socket</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Beschreibung:</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>socket_set_timeout</methodname>
|
|
<methodparam><type>int</type><parameter>socket descriptor</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>microseconds</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Setzt den Timeout-Wert von
|
|
<parameter>socket descriptor</parameter>, ausgedrückt durch die
|
|
Summe von <parameter>seconds</parameter> und
|
|
<parameter>microseconds</parameter>.
|
|
<example>
|
|
<title><function>socket_set_timeout</function>-Beispiel:</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$fp = fsockopen("www.example.com", 80);
|
|
if(!$fp) {
|
|
echo "Keine Verbindung möglich\n";
|
|
} else {
|
|
fputs($fp,"GET / HTTP/1.0\n\n");
|
|
$start = time();
|
|
socket_set_timeout($fp, 2);
|
|
$res = fread($fp, 2000);
|
|
var_dump(socket_get_status($fp));
|
|
fclose($fp);
|
|
print $res;
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<note>
|
|
<title>Hinweis:</title>
|
|
<para>
|
|
Diese Funktion hieß früher
|
|
<function>set_socket_timeout</function>,
|
|
dieser Name sollte jedoch nicht länger verwendet werden.
|
|
</para></note>
|
|
<para>
|
|
Siehe auch: <function>fsockopen</function> und
|
|
<function>fopen</function>.
|
|
</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:"../../../../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
|
|
-->
|