Project

General

Profile

Plugin development questions (configuration, etc)

Added by sandbird over 12 years ago

I'm reading the source code to understand how to develop my own mod.

My questions:

1. On every plugin I saw the plugin_data structure which has this statement:

plugin_config **config_storage

Why there's more then one copy of the configuration? is it per connection?

2. I want to have a working buffer per connection for some operation on my mod. This is a server which doesn't have too many connections so it's OK. The question is how and on what callback I can initialize the working buffer per each connection?

3. How to get access to the input POST and GET parameters from the user? I guess that it's somewhere on the "connection" structure which passed to each connection related callback.

4. Which callbacks I need to hook to implement a mod that waiting for a virtual path which doesn't pointing to a real file and response with a "resource" which I creating on the fly.

For example (this is not my mod but only an example):

The user requesting the URL www.xxx.com/WhatIsYourTime and I'll response with generated HTML text to display the time.
What callbacks I need to implement to this kind of mod?

My real mod need to:

1. Wait for a virtual path on the URL.
2. Parse the GET or POST parameters.
3. Do some operation.
4. Create on the fly a response HTML.