Infrasctucture AppSrv Function Reference
AppSrv
#include "appsrv.h"

This is the base of most Orb servers.   It has a single table which maps services (codes) to functions, error reporting (builds a response message), automatic reconnection to the Orb if it should die or be killed, and multiple server ports.   Examples abound in the inf/inf subdirectoy.

Configuration Keywords:
ASWAITTIME Sets the time in MSecs that appSrv's ioWait pauses. This will allow Delayed Events to be done.
BROKER Tells the appSrv where his Orb is (address).
SRVTYPE Overrides the service type set by the application.
SERVER2 Causes the appSrv to open additional ports (like external with encryption).
IGNOREBADTYPE Causes appSrv to NOT report inbound messages with the wrong service type.


asErr asGetState asSetState
asMain asMkRsp asSndMsg

int  asErr( char* fmt, ... elipsis )
Register an error from an appSrv function.
The message is formatted and passed to trcErr() for logging.
A response message is prepared and sent back to the caller (usually the ORB).


intasGetState()
Get the current state of the appSrv.
This isn't really implemented yet, but some functionality does exist.


int asSetState()
Set the current state of the appSrv. This isn't really implemented yet, but some functionality does exist.


int asMain( int argc, char* argv[] )
The server's main function will initialize and register any config, options, etc then call asMain which will not return.
From this point on, any requests will be passed to the registered SVC funtions.


asMkRsp( int oldHandle, int stat )
Create a response message to the last received command.


int asSndMsg( int typ, int cod, int stat, pfi_t ldFun, void* ldArg )
A message destined for the Broker (ORB) will be created and the type, code, status, etc
fields will be set per these arguments.