How do I add an event handler that listens to a specific port?

Hi,
My goal is the following: I want to have amaya listen to two different
ports and handle the corresponding inputs. Both ports will be reading
strings. The first one will be reading strings of the type "load url X"
which will need urlevent handlers. The second will be reading strings of
the type "go forward", "go back", "go back 2 pages" which will need action
handlers.

I was wondering how to put a listener to listen to these two ports and wait
for strings to come in the event loop. I also don't know which event
handlers to call so they take care of the incoming string commands. How do
I find out where they are and how to use them?

What I would eventually like to have is a listener in the event loop which
whenever gets an incoming string, identify it and call the corresponding
handler and handle it right on the spot.
I checked the code at eventloop.c and also at thotlib/dialogue/interface.c
and it looks to me I need to modify parts of Thot library
(TtaHandleOneEvent or ThotEvent) to add the extra functionality that I
want. Is this the correct way to go? Is there a simpler way so I can only
modify amaya code?

Any help or relevant code samples would greatly be appreciated
Nikos

Received on Tuesday, 22 August 2000 03:05:36 UTC