php-doc-en/reference/sockets/errors.xml
Philip Olson 3f15ebba99 MFB: Upgrade to the new-reference-structure
- Split reference.xml into book.xml, setup.xml, errors.xml and examples.xml
- Moved from reference.xml to book.xml:
  - The intro text (partintro), and link to various pages
- Moved from reference.xml to setup.xml:
  - The rest: requirements, installation, configuration, and resources
- Changed the constants section to be an <appendix>
- Changed the intro ID from <extname>.intro to intro.<extname>


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248675 c90b9560-bf6c-de11-be94-00142212c4b1
2007-12-21 20:13:30 +00:00

55 lines
2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.2 $ -->
<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>):
<programlisting role="php">
<![CDATA[
Warning - socket_bind() unable to bind address [98]: Die Adresse wird bereits verwendet
]]>
</programlisting>
</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:"../../../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
-->