mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@301112 c90b9560-bf6c-de11-be94-00142212c4b1
55 lines
2 KiB
XML
55 lines
2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<chapter xml:id="sockets.errors" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>Socket Errors</title>
|
|
<para>
|
|
The socket extension was written to provide a usable interface to the
|
|
powerful BSD sockets. Care has been taken that the functions work equally
|
|
well on Win32 and Unix implementations. Almost all of the sockets
|
|
functions may fail under certain conditions and therefore emit an
|
|
<constant>E_WARNING</constant> message describing the error. Sometimes this
|
|
doesn't happen to the desire of the developer. For example the function
|
|
<function>socket_read</function> may suddenly emit an
|
|
<constant>E_WARNING</constant> message because the connection broke
|
|
unexpectedly. It's common to suppress the warning with the
|
|
<literal>@</literal>-operator and catch the error code within the
|
|
application with the <function>socket_last_error</function> function. You
|
|
may call the <function>socket_strerror</function> function with this error
|
|
code to retrieve a string describing the error. See their description for
|
|
more information.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
The <constant>E_WARNING</constant> messages generated by the socket
|
|
extension are in English though the retrieved error message will appear
|
|
depending on the current locale (<constant>LC_MESSAGES</constant>):
|
|
<screen>
|
|
<![CDATA[
|
|
Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet
|
|
]]>
|
|
</screen>
|
|
</para>
|
|
</note>
|
|
</chapter>
|
|
|
|
<!-- 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
|
|
-->
|
|
|