<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<!DOCTYPE interface-description SYSTEM 'file:///usr/pkgsrc/lang/oo2c/work.macaroon/oo2c_32-2.0.11/rsrc/OOC/xml/interface-description.dtd'>
<interface-description name='IO:Socket' id=''>
  <import-decl name='SYSTEM' id='SYSTEM' export='no' module='SYSTEM'/>
  <import-decl name='IO' id='IO' export='no' module='IO'/>
  <import-decl name='Address' id='Address' export='no' module='IO:Address'/>
  <import-decl name='StdChannels' id='StdChannels' export='no' module='IO:StdChannels'/>
  <procedure name='Read' id='Read' export='yes'>
    <oberon-doc>
      <summary>Exported for the sake of <oberon-module href='IO:SocketChannel#'>IO:SocketChannel</oberon-module>.</summary>
      <p pad-after='yes' no-indent='yes'>Exported for the sake of <oberon-module href='IO:SocketChannel#'>IO:SocketChannel</oberon-module>.</p>
    </oberon-doc>
    <formal-parameters>
      <parameter-decl name='s' id='Read.s' export='no' variable-parameter='no'>
        <type>
          <type-name name='Socket' href='#Socket'/>
        </type>
      </parameter-decl>
      <parameter-decl name='buffer' id='Read.buffer' export='no' variable-parameter='yes'>
        <type>
          <array>
            <element-type>
              <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
            </element-type>
          </array>
        </type>
      </parameter-decl>
      <parameter-decl name='start' id='Read.start' export='no' variable-parameter='no'>
        <type>
          <type-name module='#predef' name='LONGINT'/>
        </type>
      </parameter-decl>
      <parameter-decl name='length' id='Read.length' export='no' variable-parameter='no'>
        <type>
          <type-name module='#predef' name='LONGINT'/>
        </type>
      </parameter-decl>
      <result-type>
        <type-name module='#predef' name='LONGINT'/>
      </result-type>
      <exceptions>
        <type-name module='IO' name='Error' href='IO#Error'/>
      </exceptions>
    </formal-parameters>
  </procedure>
  <procedure name='Write' id='Write' export='yes'>
    <oberon-doc>
      <summary>Exported for the sake of <oberon-module href='IO:SocketChannel#'>IO:SocketChannel</oberon-module>.</summary>
      <p pad-after='yes' no-indent='yes'>Exported for the sake of <oberon-module href='IO:SocketChannel#'>IO:SocketChannel</oberon-module>.</p>
    </oberon-doc>
    <formal-parameters>
      <parameter-decl name='s' id='Write.s' export='no' variable-parameter='no'>
        <type>
          <type-name name='Socket' href='#Socket'/>
        </type>
      </parameter-decl>
      <parameter-decl name='buffer' id='Write.buffer' export='no' variable-parameter='no'>
        <type>
          <array>
            <element-type>
              <type-name module='SYSTEM' name='BYTE' href='SYSTEM#BYTE'/>
            </element-type>
          </array>
        </type>
      </parameter-decl>
      <parameter-decl name='start' id='Write.start' export='no' variable-parameter='no'>
        <type>
          <type-name module='#predef' name='LONGINT'/>
        </type>
      </parameter-decl>
      <parameter-decl name='length' id='Write.length' export='no' variable-parameter='no'>
        <type>
          <type-name module='#predef' name='LONGINT'/>
        </type>
      </parameter-decl>
      <result-type>
        <type-name module='#predef' name='LONGINT'/>
      </result-type>
      <exceptions>
        <type-name module='IO' name='Error' href='IO#Error'/>
      </exceptions>
    </formal-parameters>
  </procedure>
  <import-decl name='-RT0' id='-RT0' export='no' module='RT0'/>
  <import-decl name='-Object' id='-Object' export='no' module='Object'/>
  <import-decl name='-Exception' id='-Exception' export='no' module='Exception'/>
  <class name='Socket'>
    <type-decl name='Socket' id='Socket' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='SocketDesc' href='#SocketDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='SocketDesc' id='SocketDesc' export='no'>
      <type>
        <record>
          <field-decl name='fd' id='SocketDesc.fd' export='read-only'>
            <type>
              <type-name module='IO' name='FileDescriptor' href='IO#FileDescriptor'/>
            </type>
          </field-decl>
        </record>
      </type>
    </type-decl>
    <procedure name='New' id='New' export='yes'>
      <oberon-doc>
        <summary>Create an unconnected socket.</summary>
        <p pad-after='yes' no-indent='yes'>Create an unconnected socket.</p>
      </oberon-doc>
      <formal-parameters>
        <result-type>
          <type-name name='Socket' href='#Socket'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='SetBlocking' id='SocketDesc.SetBlocking' export='yes'>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.SetBlocking.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <parameter-decl name='block' id='SocketDesc.SetBlocking.block' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='BOOLEAN'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Bind' id='SocketDesc.Bind' export='yes'>
      <oberon-doc>
        <summary>Bind this socket to a local address.</summary>
        <p pad-after='yes' no-indent='yes'>Bind this socket to a local address.</p>
        <p pad-after='yes' no-indent='no'>If the address is <code>NIL</code>, then the system will pick up an ephemeral port and a valid local address to bind the socket.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.Bind.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <parameter-decl name='bindPoint' id='SocketDesc.Bind.bindPoint' export='no' variable-parameter='no'>
          <type>
            <type-name module='Address' name='Socket' href='IO:Address#Socket'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Connect' id='SocketDesc.Connect' export='yes'>
      <oberon-doc>
        <summary>Connect this socket to the remote end point.</summary>
        <p pad-after='yes' no-indent='yes'>Connect this socket to the remote end point.  Result is <code>TRUE</code> if the connection has been established, and <code>FALSE</code> if the process is still in progress when this method returns.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.Connect.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <parameter-decl name='endPoint' id='SocketDesc.Connect.endPoint' export='no' variable-parameter='no'>
          <type>
            <type-name module='Address' name='Socket' href='IO:Address#Socket'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name module='#predef' name='BOOLEAN'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='FinishConnect' id='SocketDesc.FinishConnect' export='yes'>
      <oberon-doc>
        <summary>Try to complete socket connect after <oberon-proc href='#SocketDesc.Connect'>Socket.Connect</oberon-proc> has been called on a non-blocking socket.</summary>
        <p pad-after='yes' no-indent='yes'>Try to complete socket connect after <oberon-proc href='#SocketDesc.Connect'>Socket.Connect</oberon-proc> has been called on a non-blocking socket.  Result is <code>TRUE</code> on success, and <code>FALSE</code> if the connection process cannot be completed at this time.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.FinishConnect.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='#predef' name='BOOLEAN'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='RemoteAddress' id='SocketDesc.RemoteAddress' export='yes'>
      <oberon-doc>
        <summary>Returns the address of the remove end of a connection.</summary>
        <p pad-after='yes' no-indent='yes'>Returns the address of the remove end of a connection.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.RemoteAddress.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name module='Address' name='Socket' href='IO:Address#Socket'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Close' id='SocketDesc.Close' export='yes'>
      <oberon-doc>
        <summary>Close this socket.</summary>
        <p pad-after='yes' no-indent='yes'>Close this socket.</p>
        <p pad-after='yes' no-indent='no'>Once a socket has been closed, it is not available for further networking use.  That is, it can't be reconnected or rebound; a new socket needs to be created.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='SocketDesc.Close.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Socket' href='#Socket'/>
          </type>
        </receiver-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
  </class>
  <class name='Server'>
    <type-decl name='Server' id='Server' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='ServerDesc' href='#ServerDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='ServerDesc' id='ServerDesc' export='no'>
      <type>
        <record>
          <field-decl name='fd' id='ServerDesc.fd' export='read-only'>
            <type>
              <type-name module='IO' name='FileDescriptor' href='IO#FileDescriptor'/>
            </type>
          </field-decl>
        </record>
      </type>
    </type-decl>
    <procedure name='NewServer' id='NewServer' export='yes'>
      <oberon-doc>
        <summary>Create an unconnected socket.</summary>
        <p pad-after='yes' no-indent='yes'>Create an unconnected socket.</p>
      </oberon-doc>
      <formal-parameters>
        <result-type>
          <type-name name='Server' href='#Server'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='SetReuseAddress' id='ServerDesc.SetReuseAddress' export='yes'>
      <formal-parameters>
        <receiver-decl name='s' id='ServerDesc.SetReuseAddress.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Server' href='#Server'/>
          </type>
        </receiver-decl>
        <parameter-decl name='on' id='ServerDesc.SetReuseAddress.on' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='BOOLEAN'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='SetBlocking' id='ServerDesc.SetBlocking' export='yes'>
      <formal-parameters>
        <receiver-decl name='s' id='ServerDesc.SetBlocking.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Server' href='#Server'/>
          </type>
        </receiver-decl>
        <parameter-decl name='block' id='ServerDesc.SetBlocking.block' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='BOOLEAN'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Bind' id='ServerDesc.Bind' export='yes'>
      <oberon-doc>
        <summary>Bind this socket to a local address and switch it to listening mode.</summary>
        <p pad-after='yes' no-indent='yes'>Bind this socket to a local address and switch it to listening mode.  <oberon-param href='#ServerDesc.Bind.queueSize'>queueSize</oberon-param> specifies the length of the queue for pending connections.</p>
        <p pad-after='yes' no-indent='no'>If the address is <code>NIL</code>, then the system will pick up an ephemeral port and a valid local address to bind the socket.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='ServerDesc.Bind.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Server' href='#Server'/>
          </type>
        </receiver-decl>
        <parameter-decl name='bindPoint' id='ServerDesc.Bind.bindPoint' export='no' variable-parameter='no'>
          <type>
            <type-name module='Address' name='Socket' href='IO:Address#Socket'/>
          </type>
        </parameter-decl>
        <parameter-decl name='queueSize' id='ServerDesc.Bind.queueSize' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Accept' id='ServerDesc.Accept' export='yes'>
      <oberon-doc>
        <summary>Accepts a connection request from a remote socket.</summary>
        <p pad-after='yes' no-indent='yes'>Accepts a connection request from a remote socket.</p>
        <p pad-after='yes' no-indent='no'>On success, result is the local socket of the connection.  If the server socket is in non-blocking more, and there are no more pending connections, then result is <code>NIL</code>.  An error raises an exception of type <oberon-type href='IO#Error'>IO.Error</oberon-type>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='ServerDesc.Accept.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Server' href='#Server'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name name='Socket' href='#Socket'/>
        </result-type>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
    <procedure name='Close' id='ServerDesc.Close' export='yes'>
      <oberon-doc>
        <summary>Close this socket.</summary>
        <p pad-after='yes' no-indent='yes'>Close this socket.</p>
        <p pad-after='yes' no-indent='no'>Once a socket has been closed, it is not available for further networking use.  That is, it cannot be reconnected or rebound; a new socket needs to be created.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='s' id='ServerDesc.Close.s' export='no' variable-parameter='no'>
          <type>
            <type-name name='Server' href='#Server'/>
          </type>
        </receiver-decl>
        <exceptions>
          <type-name module='IO' name='Error' href='IO#Error'/>
        </exceptions>
      </formal-parameters>
    </procedure>
  </class>
  <module-ref name='IO:SocketChannel'>
    <ref-target type='html' relative-uri='SocketChannel.html'/>
  </module-ref>
  <module-ref name='IO:Address'>
    <ref-target type='html' relative-uri='Address.html'/>
  </module-ref>
  <module-ref name='IO'>
    <ref-target type='html' relative-uri='../IO.html'/>
  </module-ref>
</interface-description>
