home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Special: Spiele Hits
/
Hits-CD.iso
/
aminet
/
spiele
/
ammud1_1.lha
/
AmigaMUD
/
Doc
/
Agents.txt
next >
Wrap
Text File
|
1997-07-14
|
43KB
|
904 lines
AmigaMUD, Copyright 1997 by Chris Gray
The AmigaMUD Agents
The "Agents" in the AmigaMUD system are separate programs that run on
the server machine, and which serve as intermediaries between the
MUDServ server itself and whatever communications protocol is being
used. On earlier releases of the system, only the "MUDAgent" program
was used for this purpose - it handles a single serial port, doing
reliable asynchronous transfers to the remote client, and converting
messages between the serial format and the AmigaOS "Exec" messages
used by the server. Now that AmigaMUD works over the internet, there
are two more agent programs. MUDText is used to handle a text-only
connection from a telnet or non-specific MUD client. MUDBinary is used
to handle full connections with a remote custom client, speaking via
TCP/IP messages. These two new clients are now more likely to be used
than the old serial port client. They are simpler and will be
described first. Note that neither MUDText nor MUDBinary can be
started from the Workbench - they must be started by the "inetd"
server program, or by something similar.
I personally have tested the AmigaMUD system using AmiTCP/IP. One user
has had success using Miami, both with him running the MUD client to
connect to my server, and with me running here to connect to his
server. Any TCP/IP stack that provides the bsdsocket.library interface
should work just as well. The details of setup will of course vary
from stack to stack.
Setup for TCP/IP Operation
There are two ends of the AmigaMUD system. The client end involves the
"MUD" custom client. The documentation file "MUD.txt" contains
information on how to use it with a TCP/IP connection to talk to a MUD
server over the internet. Setting up an AmigaMUD server to be
available over the internet is discussed here. A certain level of
familiarity with the internet is assumed.
In order to host an AmigaMUD system over the internet you will of
course need an internet connection. This typically involves being at a
site that is "on" the internet, or perhaps going through a commercial
ISP (Internet Service Provider) that allows the needed activities.
Since the AmigaMUD system currently runs only on Amiga computers, an
Amiga with internet access is needed. Best for this purpose is a
fairly fast Amiga with an ethernet card, plugged into a network that
is linked to the internet. An Amiga with a SLIP or PPP connection
through a modem will also work, but that restricts the network
capacity available, and requires a dedicated telephone line if it is
to be available continuously. Those lucky people with ISDN lines to
their systems are perhaps the best off. Cable modems are more
difficult to use as servers like this, since they often do not have
fixed IP addresses, and the cable companies sometimes explicitly
disallow users from running servers.
After the hardware is setup, you will also need software to provide a
"TCP/IP stack", which is the collection of drivers and protocol
software that understands the internet standards in order to properly
be a host on the internet. AmigaMUD does not come equipped with this
software - you must obtain it elsewhere. As mentioned above, AmigaMUD
is known to work with the AmiTCP/IP and Miami stacks, and should work
with any stack that provides the "bsdsocket.library" interface. Note
that you may not get an actual "bsdsocket.library" file to put into
your "libs:" directory. AmiTCP/IP, for example, creates the library
dynamically when it is started up. Because of this, the various
AmigaMUD programs, when directed to use TCP/IP connections, may fail
if your TCP/IP stack is not already running.
In order for one computer to contact another over a TCP/IP connection,
it must know a port number to attempt the connection on. These port
numbers are not related to the named AmigaOS Exec message ports that
the AmigaMUD server itself uses for communication. There are usually
two choices for the protocol to use for such ports - TCP or UDP.
AmigaMUD only works with the reliable TCP protocol. The port numbers I
have randomly chosen to use as the defaults are 6666 for a text
connection, and 6667 for a binary connection with the custom AmigaMUD
"MUD" client. Some sites may not allow these ports through their
security firewalls, in which case others can be chosen.
With AmiTCP/IP, you must define the ports you want to use in the file
"amitcp:db/services". Lines in that file look like this:
mudtext 6666/tcp
mudbinary 6667/tcp
On UNIX systems, this file is usually located in the "/etc" directory.
Once you have the port numbers chosen, you need to set up something
that will run the MUDText or MUDBinary agents when an external
connection comes in for one of those ports. On UNIX systems and with
AmiTCP/IP, this is done via the "inetd" program. This program is
thought of as a "super server" which accepts connections on any of the
ports it is told about, and which will then run the appropriate
program for that port. This information is given to it in the file
"inetd.conf", which is also located in "amitcp:db" or "/etc". Assuming
you have set up the normal "AmigaMUD:" assign on your Amiga, and have
created the above entries in your "services" file, the lines for
AmiTCP/IP's inetd look like this:
mudtext stream tcp nowait bin/stack=10000 AmigaMUD:Progs/MUDText MUDText
mudbinary stream tcp nowait bin AmigaMUD:Progs/MUDBinary MUDBinary
If you need to add command line flags to either program, you do that
by adding them at the end of the lines. For details on the format of
the above lines, consult the appropriate AmiTCP/IP documentation.
With Miami, all of the above configuration is done within the main
Miami program, and is set up using GUIs. Consult the Miami
documentation for details. (I haven't seen it myself, so cannot help
you with it, but I've been told that it *is* there, so don't bug
Holger about it! In email he indicates that the appropriate entries
are in the "Services" and "InetD" pages.) For other TCP/IP stacks, you
will have to consult the documentation for those stacks.
With the above setup, a summary of what is going on goes something
like this (for a full binary "MUD" connection):
- server machine establishes internet connection and starts its
AmigaMUD server, and its inetd.
...
- client machine establishes internet connection
...
- user runs "MUD" client program, specifying (see "MUD.txt") the
name or address of the machine to connect to, along with the
TCP port to connect on.
- inetd on server machine notices incoming connection request, and
consults its configuration to see what to do with it. If all
is well, it starts the "MUDBinary" program, and passes the
connection off to that program. Inetd will then go back to
waiting for more connection requests.
- MUDBinary attempts to contact a MUDServ via the AmigaOS Exec
message port "MUD port" or any other name specified (see
below).
- MUDServ and the remote MUD client begin exchanging messages to
allow character login/creation and gameplay.
...
- player chooses to stop playing, and enters appropriate game
command or otherwise informs "MUD" that he/she wants to quit.
After a few messages back and forth, "MUD" will terminate on
the client machine, and the specific "MUDBinary" will
terminate on the server machine.
MUDBinary
The MUDBinary program is used to connect a remote "MUD" client program
running over TCP/IP with the server on the local machine. There will
be one copy of MUDBinary running for each such client. Do not attempt
to run MUDBinary manually or from the Workbench - it is designed to
only be run from an "inetd" program or similar server setup. MUDBinary
accepts the following command line parameters:
-T - run using the test port "MUD test port" instead of the
default port "MUD port". This is handy if you want to run a
test server as well as a regular server.
-P<name> - run using the given port name instead of the default
port name.
-R<count> - use <count> as the number of server request messages
to allow to accumulate in this program. The default is 10.
There is little that can be said about M