php-doc-en/reference/sockets/functions/socket-clear-error.xml
Máté Kocsis 14dc7c4736 Generate sockets methodsynopses based on stubs
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-311.
2021-01-10 19:04:58 +01:00

102 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.socket-clear-error" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>socket_clear_error</refname>
<refpurpose>Clears the error on the socket or the last error code</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>socket_clear_error</methodname>
<methodparam choice="opt"><type class="union"><type>Socket</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
This function clears the error code on the given socket or the global
last socket error if no socket is specified.
</para>
<para>
This function allows explicitly resetting the error code value either of
a socket or of the extension global last error code. This may be useful
to detect within a part of the application if an error occurred or not.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>socket</parameter></term>
<listitem>
<para>
A <classname>Socket</classname> instance created with <function>socket_create</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</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;
<row>
<entry>8.0.0</entry>
<entry>
<parameter>socket</parameter> is nullable now.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>socket_last_error</function></member>
<member><function>socket_strerror</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
-->