<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.8">
  <compounddef id="NetworkPrintConnector_8php" kind="file">
    <compoundname>NetworkPrintConnector.php</compoundname>
    <innerclass refid="classMike42_1_1Escpos_1_1PrintConnectors_1_1NetworkPrintConnector" prot="public">Mike42::Escpos::PrintConnectors::NetworkPrintConnector</innerclass>
    <innernamespace refid="namespaceMike42_1_1Escpos_1_1PrintConnectors">Mike42::Escpos::PrintConnectors</innernamespace>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="normal">&lt;?php</highlight></codeline>
<codeline lineno="13"><highlight class="keyword">namespace<sp/></highlight><highlight class="normal"><ref refid="namespaceMike42_1_1Escpos_1_1PrintConnectors" kindref="compound">Mike42\Escpos\PrintConnectors</ref>;</highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="15"><highlight class="normal">use<sp/><ref refid="namespaceException" kindref="compound">Exception</ref>;</highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="20" refid="classMike42_1_1Escpos_1_1PrintConnectors_1_1NetworkPrintConnector" refkind="compound"><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classMike42_1_1Escpos_1_1PrintConnectors_1_1NetworkPrintConnector" kindref="compound">NetworkPrintConnector</ref><sp/></highlight><highlight class="keyword">extends</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1PrintConnectors_1_1FilePrintConnector" kindref="compound">FilePrintConnector</ref></highlight></codeline>
<codeline lineno="21"><highlight class="normal">{</highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">public</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal"><sp/><ref refid="classMike42_1_1Escpos_1_1PrintConnectors_1_1NetworkPrintConnector_1ad02b8d29a3b2f0539b0b9242e112ed9d" kindref="member">__construct</ref>($ip,<sp/>$port<sp/>=<sp/></highlight><highlight class="stringliteral">&quot;9100&quot;</highlight><highlight class="normal">,<sp/>$timeout<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)</highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Default<sp/>to<sp/>60<sp/>if<sp/>default_socket_timeout<sp/>isn&apos;t<sp/>defined<sp/>in<sp/>the<sp/>ini</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$defaultSocketTimeout<sp/>=<sp/>ini_get(</highlight><highlight class="stringliteral">&quot;default_socket_timeout&quot;</highlight><highlight class="normal">)<sp/>?:<sp/>60;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$timeout<sp/>=<sp/>$timeout<sp/>?:<sp/>$defaultSocketTimeout;</highlight></codeline>
<codeline lineno="35"><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>$this<sp/>-&gt;<sp/>fp<sp/>=<sp/>@fsockopen($ip,<sp/>$port,<sp/>$errno,<sp/>$errstr,<sp/>$timeout);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>($this<sp/>-&gt;<sp/>fp<sp/>===<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">throw</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/><ref refid="namespaceException" kindref="compound">Exception</ref>(</highlight><highlight class="stringliteral">&quot;Cannot<sp/>initialise<sp/>NetworkPrintConnector:<sp/>&quot;</highlight><highlight class="normal"><sp/>.<sp/>$errstr);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="41"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="C:/www/aplusnet/incahellas.com/public_html/lib/escpos-php-development/src/Mike42/Escpos/PrintConnectors/NetworkPrintConnector.php"/>
  </compounddef>
</doxygen>
