<doc>
  <legacy_id>1997</legacy_id>
  <name>openSockets</name>
  <type>function</type>
  <syntax>
    <example>the openSockets</example>
    <example>openSockets()</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Networks  Communication</category>
  </classification>
  <references>
    <command tag="accept">accept 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>
    <network/>
  </security>
  <summary><glossary tag="return">Returns</glossary> a list of the currently open <glossary tag="socket">sockets</glossary>.</summary>
  <examples>
    <example>the openSockets</example>
    <example>if line thisLine of the openSockets is "example.com:80" then beep</example>
  </examples>
  <description>
    <p>Use the <b>openSockets</b> <control_st tag="function">function</control_st> to find out which <glossary tag="socket">sockets</glossary> need to be closed, or to check whether a <glossary tag="socket">socket</glossary> is already open before reading from it or writing to it.</p><p/><p><b>Value:</b></p><p>The <b>openSockets</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a list of the open <glossary tag="socket">sockets</glossary>, one per <keyword tag="line">line</keyword>.</p><p/><p><b>Comments:</b></p><p>Each line of the list returned by the <b>openSockets</b> function is a <glossary tag="socket">socket</glossary> identifier. A <glossary tag="socket">socket</glossary> identifier consists of the <glossary tag="disabled">host</glossary> and <glossary tag="port">port</glossary> number the <glossary tag="socket">socket</glossary> is connected to, separated by a colon. If a connection name or number was assigned when the <glossary tag="socket">socket</glossary> was opened, it is <glossary tag="append">appended</glossary> to the identifier, separated from the <glossary tag="port">port</glossary> number by a vertical bar (|).</p><p/><p><b>Note:</b> Several of the commands and functions in the Internet library use sockets, so the openSockets func may return sockets opened by the Internet library in addition to any sockets you have opened with the open socket com.</p>
  </description>
</doc>