class ZSERVER : public ZSESSION

Basic Z39.50 Server Class - Handles all Server functionality

Inheritance:

Public Fields



Public Methods

INT AcceptClient ()
wait for client connection
void DatabaseName (STRING *Value)
Get the current database name for this server
GDT_BOOLEAN ForkingInit ()
Start forking server listening
INT GetMaxSessions ()
How many children can we spawn?
STRING GetServerType ()
What kind of server are we running?
void SingleCleanup ()
Clean up after running the INETD server
void SingleInit ()
Initialize the INETD server
INT StartForkingServer (UINT Port)
void StartServer ()
Run the server.
INT StartServer (UINT Port)
start a server on a given port
void StartSession ()
start a single Z39.50 session
ZSERVER ()
Generic constructor
ZSERVER (int argc, char **argv)
Create a Z39.50 server object
ZSERVER (const ZSERVER& OtherServer)
Copy constructor for a Z39.50 server object
~ZSERVER ()
Destroy a server and close all connections

Private Fields

c_accesslog
INT c_argc
CHR** c_argv
c_client_hostname
c_client_ipaddress
c_database_count
PLIST* c_dblist
c_default_db
c_diagsetid
INT c_forking
c_groupid
c_hitcount
c_imp_id
c_imp_name
c_imp_version
c_inipath
ZINITREQUEST* c_init_req
ZINITRESPONSE* c_init_res
REGISTRY* c_mapping_table
LONG c_max_rec_size
INT c_max_sessions
ofstream c_output_file
c_password
c_preferred_msg_size
SAPI_RSET* c_result_set
c_reverse_name_lookup
SAPI* c_sapi
c_sapifile
c_sapipath
TCPSOCK* c_server_tcp
STRING c_server_type
c_trace
c_tracelog
c_userid
SAPI* TmpSapi

Private Methods

void BuildReturnRecordList (ZRESPONSERECORDS *Records, STRING es_name, STRING rec_syntax, INT start_point, INT num_requested)
Construct a set of records
void Copy (const ZSERVER& OtherServer)
Create a new instance
ZESUPDATERESPONSE* ESUpdate (ZESTASKPACKAGE *TaskPackage, ZESUPDATEREQUEST & Request)
update records in the databases
void FreeSapi ()
clean up the sapi
void Init ()
Initialize the server
INT Listen (UINT Port)
listen for connection on a given port
void Log (CHR *Method, CHR *Extra, INT Status, INT4 BytesSent)
write logging data
SAPI_DB* MetaSearch (STRING DBN)
perform a search of user-selected multiple databases
ZPRESENTRESPONSE* Present (ZPRESENTREQUEST & Request)
retrieve a record from the databases
ZPRESENTRESPONSE* PresentResponseWithDiagnostic (const STRING & DiagSetOID, const INT4 ErrorCode, const STRING & AddInfo)
Generate Present Response
ZSEARCHRESPONSE* Search (ZSEARCHREQUEST & Request)
perform a search in the databases
void SetDefaults ()
void StoreDefaults (const STRING & Group)
void ZSERVER::AddToMappingTable (const STRING &FileToAdd, const STRING &DatabaseName)
ad field maps to the master mapping table

Inherited from ZSESSION:

Public Methods

INT Close()
INT GetDebugLevel()
GDT_BOOLEAN GetOption(const INT Option)
void GetProtocolVersion(INT *Version)
void SetDebugLevel(INT Level)

Protected Fields

c_dbname
INT c_debuglevel
REGISTRY* c_defaults
c_group
c_inifile
c_maxrecordsize
c_options
UINT c_port
INT4 c_prefmsgsize
STRING c_protocol_version
c_refid
TCPSOCK* c_tcp
c_timeout

Protected Methods

void ClearOptions()
void LoadDefaultsFromCommandLine(int ac, char **argv, STRING & File, STRING & Group, STRING *LastGroup, STRING *LastFile)
void LoadDefaultsFromFile(const STRING & Filename, const STRING & Group)
void PrintConnectionDetails()
PUCHR ReadPDU(INT4 *len, unsigned short *type)
PUCHR ReadPresentPDU(INT4 *len, unsigned short *type)
INT4 SendPDU(PZPDU pdu)
INT4 SendPresentPDU(PZPDU pdu)
void SetExceptionalRecordSize(const INT4 Value)
void SetOption(const INT Option, const GDT_BOOLEAN Value)
void SetOptions(const STRING & Options)
void SetPreferredMessageSize(const INT4 Value)
void SetProtocolVersion(const STRING & Value)

Documentation

Basic Z39.50 Server Class - Handles all Server functionality
ofstream c_output_file

INT c_max_sessions

c_preferred_msg_size

c_database_count

c_hitcount

LONG c_max_rec_size

STRING c_server_type

c_trace

c_tracelog

c_accesslog

c_sapifile

c_sapipath

c_diagsetid

c_imp_id

c_imp_name

c_imp_version

c_reverse_name_lookup

c_client_hostname

c_client_ipaddress

c_groupid

c_userid

c_password

c_default_db

c_inipath

ZINITREQUEST* c_init_req

ZINITRESPONSE* c_init_res

INT c_forking

TCPSOCK* c_server_tcp

SAPI_RSET* c_result_set

SAPI* c_sapi

PLIST* c_dblist

REGISTRY* c_mapping_table

INT c_argc

CHR** c_argv

SAPI* TmpSapi

void Copy(const ZSERVER& OtherServer)
Create a new instance

INT Listen(UINT Port)
listen for connection on a given port

SAPI_DB* MetaSearch(STRING DBN)
perform a search of user-selected multiple databases

void FreeSapi()
clean up the sapi

ZSEARCHRESPONSE* Search(ZSEARCHREQUEST & Request)
perform a search in the databases

ZPRESENTRESPONSE* Present(ZPRESENTREQUEST & Request)
retrieve a record from the databases

ZESUPDATERESPONSE* ESUpdate(ZESTASKPACKAGE *TaskPackage, ZESUPDATEREQUEST & Request)
update records in the databases

void SetDefaults()

void StoreDefaults(const STRING & Group)

void Log(CHR *Method, CHR *Extra, INT Status, INT4 BytesSent)
write logging data

void ZSERVER::AddToMappingTable(const STRING &FileToAdd, const STRING &DatabaseName)
ad field maps to the master mapping table

void Init()
Initialize the server

ZPRESENTRESPONSE* PresentResponseWithDiagnostic(const STRING & DiagSetOID, const INT4 ErrorCode, const STRING & AddInfo)
Generate Present Response

void BuildReturnRecordList(ZRESPONSERECORDS *Records, STRING es_name, STRING rec_syntax, INT start_point, INT num_requested)
Construct a set of records

ZSERVER(int argc, char **argv)
Create a Z39.50 server object

ZSERVER(const ZSERVER& OtherServer)
Copy constructor for a Z39.50 server object

ZSERVER()
Generic constructor

~ZSERVER()
Destroy a server and close all connections

INT StartForkingServer(UINT Port)

void SingleInit()
Initialize the INETD server

GDT_BOOLEAN ForkingInit()
Start forking server listening

void SingleCleanup()
Clean up after running the INETD server

void StartSession()
start a single Z39.50 session

INT StartServer(UINT Port)
start a server on a given port

void DatabaseName(STRING *Value)
Get the current database name for this server

void StartServer()
Run the server.

STRING GetServerType()
What kind of server are we running?

INT GetMaxSessions()
How many children can we spawn?

INT AcceptClient()
wait for client connection

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Z&oumlckler, Roland Wunderling
contact: doc++@zib.de