What can be customized?
Installation on Unix Systems
Installation on Windows NT
Integrate your custom server into Community Server




What can be customized?

The file apevent.c contains a complete customized server implementation and uses about all of the API calls that can be used to write your own custom server.
Please take this file as template and modify the appropriate functions to meet your requirements.

For details look at the
API documentation and the Remote Acess Documentation.

Installation on Unix Systems

There are no special installation actions for Unix platforms. Just customize the file apevent.c and build your customized server by using the Makefile supplied.
Copy the new server executable to /bin and check the file permissions (it must have executable rights).
Then edit the file /chstart and add the appropriate startup line for your customized server.

Example:
The following line would be added to chstart if the installation directory is /home/blaxxun, the custom server is called myserver, running on port 2030 and our idserver is running on port 2000.

/home/blaxxun/bin/myserver -p 2030 -BSIROOT /home/blaxxun -i localhost:2000


After having finished the above steps please follow the steps described in
Community Server setup.

Installation on Windows NT

  1. Edit file apntserv.h
    Insert your own names for the both defines:
    #define APNT_SERVICE_NAME "apserver"
    // this is the name of your NT service and also the registry
    // prefix for the "apserverPort" reg value.
    #define APNT_REGVAL_IDSERVER "apserverIdserverHostPort"
    // this is the name of the registry key for the idserver port
    Edit the file apevent.c
    modify the existing event handler functions to your needs.
  2. Open the makefile apserver.mak in VC++ 4.2.

  3. Compile and build the executable release/apserver.exe
    If you rename the servicename you should also rename the exe file.

  4. Register the apserver.exe file under NT with the command line tool bin/sinstall.exe. Use the same servicename as entered in the H-file before for APNT_SERVICE_NAME.
    Enter an absolute pathname for the exepath.
    Usage: sinstall servicename servicedisplayname exepath

  5. Enter two new values in the registry:

    • Open regedit.exe
    • Go to key HKEY_LOCAL_MACHINE/Software/BlackSunInteractive/Community Server
    • Add a new String value "apserverPort" = 2006 (use the servicename you entered in the H-FILE for APNT_SERVICE_NAME as prefix, and chooce an available UDP port)
    • Add a new String value "apserverIdserverHostPort" = localhost:2000 (use the name you entered for APNT_REGVAL_IDSERVER for the reg value, and set the port of the idserver)
  6. Start the NT Service Control Manager and start your new service. The new process writes a log file under C:\BlackSun\CommServ\log\

  7. You can unregister the service using the command bin/sdelete.exe 

  8. Then follow the steps described in Community Server setup.

Configuring Community Server to run with your customized Server

Open your Community Server administrator console and select item Config to open and edit your Community Server configuration file.
Add the following line:

APISERVER host:port

where host is the hostname of the machine your customized server runs on and port is the port it listens to. Then hit the Apply button to apply the changes.

Example:
The following line would be added to the configuration file if your custom server runs on the same machine as the community server (which is the most common and default setup) and listens to port 2030:

APISERVER localhost:2030

Now your must restart the Community Server (by clicking on the Restart button) and your custom server will apper as one of the running processes in the status list of the administrator console.

 
© 2001 blaxxun interactive. All rights reserved.