This wrapper takes the place of a game client, and relays the
control messages between the game and the invoking instance, which is
a GGZ core client. One task is to manage
different file descriptors than the ones which are normally used.
The GGZ clients do currently communicate using a socket which is
passed in the environment variable GGZSOCKET, usually being
fd 53 on the client side, so a call to:
ggzwrap --fdin=$GGZSOCKET --fdout=$GGZSOCKET --exec=gameclient
would be equivalent to calling the client directly. However, there are games
which communicate using the standard input/output facilities, so they need a
ggzwrap --fdin=0 --fdout=1 --exec=gameclient
The GGZ game Muehle uses ggzwrap to demonstrate that game clients do
not necessarily need to use any GGZ libraries. The downside is that a lot of
game client functionality will not be available.
Game clients which want to make use of the wrapper must add a command similar
to the one above into the file ggz.modules.