W3C home > Mailing lists > Public > www-amaya-dev@w3.org > August 2000

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

From: Nikos Michalakis <nikos@MIT.EDU>
Date: Mon, 21 Aug 2000 16:06:41 -0400 (EDT)
Message-Id: <200008212006.QAA00793@melbourne-city-street.MIT.EDU>
To: www-amaya-dev@w3.org
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:48:59 GMT