libASSA Programmer's Manual

Vladislav Grinchenko

$Id: libassa-manual.sgml,v 1.2 2003/07/15 03:30:14 vlg Exp $

Table of Contents
Introduction
1. Library Layers
1. Application Shell
1.1. Library Requirements
1.2. Hello, World!
1.2.1. Using assa-genesis Utility
1.3. GenServer Introduction
1.4. What's Under The Hood?
1.5. Command Line Arguments
1.5.1. Running Process As UNIX daemon
1.5.2. Redirecting debug messages to stdout
1.5.3. Log File Name
1.5.4. Message Logging Levels
1.5.5. Log File Size
1.5.6. Version And Author Information
1.5.7. Service Name (Port Number)
1.5.8. Configuration File Name
1.5.9. Process Instance Number
1.5.10. PID Lock File
1.5.11. Embedded man Page
1.5.12. Command Line Options Summary
1.6. Handling UNIX Signals
1.7. Mixing Different Toolkits
1.7.1. Separating Command-line Arguments
1.7.2. Gtkmm Event Loop
1.7.3. Motif Event Loop
1.7.4. CORBA Event Loop
1.8. Summary
2. Writing Network Applications
2.1. Log Server Desing
2.1.1. Log Server Setup
2.1.2. Log Monitor Setup
2.1.3. Test Client Setup
2.2. Accepting Connection Requests with Acceptor
2.2.1. Class ServiceHandler
2.2.2. Adding Conn Handler
2.2.3. Connection Handler Implementation
2.2.3.1. Endpoint Initialization Phase
2.2.3.2. Service Initialization Phase
2.2.3.3. Service Processing Phase
2.2.3.4. Termination Phase
2.2.3.5. Summary
2.3. Connecting with Connector
2.3.1. Initialization Phase
2.3.2. Connecting Synchronously
2.3.2.1. Adding LogConn Proxy Class
2.3.2.2. Adding Monitoring Support to assa-logd
2.3.2.3. Testing Synchronous Connection
2.3.3. Connecting Asynchronously
2.4. Data I/O Over TCP/IP Transport Layer
2.4.1. Socket Class
2.4.2. Testing Socket Stream State
2.4.3. Blocking vs. Non-Blocking I/O
2.4.4. Buffered vs Non-Buffered I/O
2.4.5. Non-Blocking I/O (Polling)
2.5. I/O Multiplexing with Reactor
2.5.1. Requirements
2.5.2. Overview
2.5.3. Class EventHandler
2.5.4. Registering EventHandler
2.5.5. Processing Events
2.5.5.1. Record-Oriented Data Stream
2.5.5.2. Binary Data Stream
2.5.6. Removing EventHandler
2.6. Reactor Event Loop
3. Implementing Communication Protocols
3.1. Binary Data Stream Protocol
3.1.1. Communication Protocol
3.1.1.1. Message Header
3.1.1.2. SIGN_ON Message
3.1.1.3. SIGN_OFF Message
3.1.1.4. LOG_MSG Message
3.1.2. Client Side Modifications
3.1.2.1. log-client Modifications
3.1.2.2. RemoteLogger Sending Code
3.1.2.2.1. Signing On
3.1.2.2.2. Sending A Message
3.1.2.2.3. Signing Off
3.1.3. Server Side Modifications
3.1.3.1. Conn Class Declaration
3.1.3.2. Conn Class Constructor
3.1.3.3. Conn::open() Modifications
3.1.3.4. Conn::handle_read() Modifications
3.1.3.5. Conn::handle_close() Modifications
3.1.3.6. Adding Utility Functions
3.1.4. Testing Modifications
3.2. Record-Oriented Stream Protocol
3.2.1. Communication Protocol
3.2.2. Server-Side Modifications
3.2.3. Testing Modifications
3.3. Summary
4. Class Reference
4.1. Assert_exit() Macro
4.2. Assert_return() Macro
4.3. AutoPtr Class
4.3.1. DEFINITION
4.3.2. USAGE
4.3.3. Examples
4.4. CmdLineOpts class
4.4.1. DEFINITION
4.4.2. USAGE
4.5. Fork Class
4.5.1. DEFINITION
4.5.2. USAGE
4.6. IdSet Class
4.6.1. DEFINITION
4.6.2. USAGE
4.7. MemDump Class
4.7.1. DEFINITION
4.7.2. USAGE
4.8. Reactor Class
4.8.1. DEFINITION
4.8.2. USAGE
4.9. Semaphore Class
4.9.1. DEFINITION
4.9.2. USAGE
4.10. SigAction Class
4.10.1. DEFINITION
4.11. SigHandler Class
4.11.1. DEFINITION
4.11.2. USAGE
4.12. SigHandlers Class
4.12.1. DEFINITION
4.13. SigSet Class
4.13.1. DEFINITION
4.13.2. USAGE
4.14. Singleton Class
4.14.1. DEFINITION
4.14.2. USAGE
4.15. PidFileLock Class
4.15.1. DEFINITION
4.15.2. USAGE
4.16. TimeVal Class
4.16.1. DEFINITION
4.16.2. USAGE
4.17. TimerCountdown CLASS
4.17.1. DESCRIPTION
4.17.2. USAGE
4.18. trace()/ trace_with_macro() Macros
4.18.1. DEFINITION
4.18.2. USAGE
4.19. xdrIOBuffer CLASS
4.19.1. DESCRIPTION
4.19.2. USAGE
4.20. CharInBuffer CLASS
4.20.1. DESCRIPTION
4.20.2. USAGE
Bibliography