<refentry id="reference-gtpserver">

<refmeta>
<refentrytitle>gtpserver</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="source-name">GoGui</refmiscinfo>
<refmiscinfo class="version">GoGui &version;</refmiscinfo>
<refmiscinfo class="manual">GoGui Reference</refmiscinfo>
</refmeta>

<refnamediv>
<refname>gtpserver</refname>
<refpurpose>
Connects a Go program supporting Go Text Protocol to a socket.
</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>gtpserver</command>
<arg choice="plain"><option>-port</option> <replaceable>n</replaceable></arg>
<arg><option>-config</option> <replaceable>file</replaceable></arg>
<arg><option>-loop</option></arg>
<arg><option>-remote</option> <replaceable>hostname</replaceable></arg>
<arg><option>-user</option> <replaceable>file</replaceable></arg>
<arg><option>-verbose</option></arg>
<arg choice="plain"><replaceable>program</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>gtpserver</command>
<arg choice="plain"><option>-help</option></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>gtpserver</command>
<arg choice="plain"><option>-version</option></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsection>
<title>Description</title>
<para>
Runs a Go program supporting the Go Text Protocol by executing
<replaceable>program</replaceable>, and connects its input and output to a
listen socket on port number <replaceable>port</replaceable> of the local
computer, so that other programs can connect to it from the network.
If the option <option>-remote</option> is used, an connection to another
host is made, instead of waiting for incoming connections.
</para>
</refsection>

<refsection>
<title>Options</title>
<variablelist>

<varlistentry>
<term>
<option>-config</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
Read command line options and arguments from file.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-help</option>
</term>
<listitem>
<para>
Display help and exit.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-loop</option>
</term>
<listitem>
<para>
After connection is finished, restart the program and wait for next
connection, .
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-port</option> <replaceable>n</replaceable>
</term>
<listitem>
<para>
Port number to user for the socket.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-remote</option> <replaceable>hostname</replaceable>
</term>
<listitem>
<para>
Connect to a remote host, instead of waiting for incoming connections.
See also <option>-user</option>.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-user</option> <replaceable>file</replaceable>
</term>
<listitem>
<para>
If the option <option>-remote</option> is used,
and the remote program requires that any connecting program sends some plain
text login information before waiting for commands,
then this option can be used.
The argument is a filename;
the content of this file is sent verbatim to the remote computer.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-verbose</option>
</term>
<listitem>
<para>
Print debugging messages.
</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-version</option>
</term>
<listitem>
<para>
Print version and exit.
</para>
</listitem>
</varlistentry>

</variablelist>

<para>
<!-- Empty paragraph to enforce some space in JEditorPane (Java 1.5.0) -->
</para>

</refsection>

</refentry>
