Question

I'm trying out the handlers shipped with g-wan but i cant seem to locate any good documentation on this subject.

I have renamed the main_hello.c__ to main_hello.c and restarted g-wan.

But how do i se the result of the handler?

It seems nothing is triggered?

Was it helpful?

Solution

I renamed the main_hello.c__ to main_hello.c

Handler names are following conventions that you should use. Read the G-WAN PDF manual, and the Developers' Web site page which presents the different kinds of handlers, and how to use them.

In short, Connection handlers are defined per-host and must be named main.c.

And Content-type handlers are defined per-MIME type (HTML, GIF, FLV, etc.) and must be named html.c, gif.c, flv.c, etc.

A handler named main_hello.c will just be ignored because it targets no defined use.

how do i se the result of the handler?

In the source code of some G-WAN handler examples you will see commented printf() or puts() calls that let you know during development when a handler state is executed.

Since the "result of a handler" is dependent on what the handler does so there is no way to see what it does unless it has a visible interaction with the server's behavior (filtering, logging, rewriting, etc.).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top