php-doc-en/reference/gupnp/functions/gupnp-context-new.xml
Richard Quadling 6f78fd0289 Show E_xxxx as constants.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@301114 c90b9560-bf6c-de11-be94-00142212c4b1
2010-07-09 09:57:39 +00:00

104 lines
2.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.gupnp-context-new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>gupnp_context_new</refname>
<refpurpose>Create a new context</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>gupnp_context_new</methodname>
<methodparam choice="opt"><type>string</type><parameter>host_ip</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>0</initializer></methodparam>
</methodsynopsis>
<para>
Create a new context with the specified host_ip and port.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>host_ip</parameter></term>
<listitem>
<para>
The local host's IP address, or NULL to use the IP address of the first non-loopback network interface.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>port</parameter></term>
<listitem>
<para>
Port to run on, or 0 if you don't care what port is used.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
A context identifier.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Create new UPnP context</title>
<programlisting role="php">
<![CDATA[
<?php
/* Create the UPnP context */
$context = gupnp_context_new();
if (!$context) {
die("Error creating the GUPnP context\n");
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="errors">
&reftitle.errors;
<para>
Issues <constant>E_WARNING</constant> with unable to create context.
</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
-->