<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../plugin.xsl" type="text/xsl"?>
<plugin name="SocketInjector">
  <object class="org.ow2.isac.plugin.socketinjector.SessionObject">
    <params>
      <param name="unit" type="String" />
    </params>
    <help>Manages a socket connection, for both reading and writing. Data read from the socket may be retrieved through variables whose names are chosen for each issued read.</help>
  </object>
  <sample name="close" number="6">
    <help>Closes the socket.</help>
  </sample>
  <sample name="readBytes" number="0">
    <params>
      <param name="buffername" type="String" />
    </params>
    <help>Reads bytes from the socket.</help>
  </sample>
  <sample name="readUTFString" number="1">
    <params>
      <param name="buffername" type="String" />
    </params>
    <help>Reads an UTF string from the socket.</help>
  </sample>
  <sample name="writeBytes" number="2">
    <params>
      <param name="datastring" type="String" />
    </params>
    <help>Writes bytes into the socket.</help>
  </sample>
  <sample name="writeUTFString" number="3">
    <params>
      <param name="datastring" type="String" />
    </params>
    <help>Writes an UTF string into the socket.</help>
  </sample>
  <sample name="connect" number="8">
    <params>
      <param name="localip" type="String" />
      <param name="localport" type="String" />
      <param name="remoteip" type="String" />
      <param name="remoteport" type="String" />
      <param name="timeout" type="String" />
    </params>
    <help>Creates a socket and connects it to a remote server, within the given timeout delay (a time out value of 0 means infinite timeout).</help>
  </sample>
  <test name="isOpen" number="7">
    <params>
      <param name="options" type="String" />
    </params>
    <help>True is the socket is currently open, false otherwise; or the contrary of option not is activated</help>
  </test>
  <test name="EOF" number="11">
    <params>
      <param name="options" type="String" />
    </params>
    <help>End of stream has been reached.</help>
  </test>
  <test name="timedOut" number="12">
    <params>
      <param name="options" type="String" />
    </params>
    <help>The previous accpet or read operation failed on time out.</help>
  </test>
  <control name="accept" number="9">
    <params>
      <param name="localip" type="String" />
      <param name="localport" type="String" />
      <param name="timeout" type="String" />
    </params>
    <help>Creates a server socket and waits for client connection.</help>
  </control>
  <control name="setTimeOut" number="10">
    <params>
      <param name="timeout" type="String" />
    </params>
    <help>Sets the timeout value for socket read operations. The socket must be open before setting a timeout (using 'accept' control or 'connect' sample).</help>
  </control>
</plugin>

