<doc>
  <legacy_id>1381</legacy_id>
  <name>socketError</name>
  <type>message</type>
  <syntax>
    <example>socketError <i>socketID</i>,<i>errorString</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
    <card/>
    <group/>
    <field/>
    <button/>
    <graphic/>
    <scrollbar/>
    <player/>
    <image/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Networks &amp; Communication</category>
  </classification>
  <references>
    <command tag="resetAll">resetAll Command</command>
    <message tag="socketTimeout">socketTimeout Message</message>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Sent when an <glossary tag="error">error</glossary> occurs on a <glossary tag="socket">socket</glossary> that causes the <glossary tag="socket">socket</glossary> to close or to fail to open.</summary>
  <examples>
    <example>on socketError theID, theError</p><p>  answer error "There is a problem with the connection." \</p><p>     with "Debugging Info" or "Cancel"</p><p>  if it is "Debugging Info" then answer information theError</p><p>  close socket theID</p><p>end socketError</example>
  </examples>
  <description>
    <p>Handle the <b>socketError</b> <keyword tag="message box">message</keyword> to perform cleanup after a <glossary tag="socket">socket</glossary> closes due to a problem receiving or sending data.</p><p/><p><b>Parameters:</b></p><p>The <i>socketID</i> is the identifier (set when you opened the <glossary tag="socket">socket</glossary>) of the <glossary tag="socket">socket</glossary> which had an <glossary tag="error">error</glossary>.</p><p/><p>The socket identifier starts with the IP address of the host the socket is connected to, and may optionally include a port number (separated from the IP address by a colon). If there is more than one socket connected to that host and port, you can specify which socket by appending the connection name or number that was assigned when the socket was opened, separated from the <glossary tag="port">port</glossary> number by a vertical bar (<code>|</code>).</p><p/><p>The <i>errorString</i> is a description of the <glossary tag="socket">socket</glossary> <glossary tag="error">error</glossary>.</p><p/><p><b>Comments:</b></p><p>The <b>socketError</b> <keyword tag="message box">message</keyword> is sent to the <glossary tag="object">object</glossary> that opened the <glossary tag="socket">socket</glossary>.</p><p/><p>If the socket is closed by the remote host normally, rather than due to an error, the <b>socketClosed</b> <keyword tag="message box">message</keyword> is sent instead of <b>socketError</b>.</p>
  </description>
</doc>