File: server.h

package info (click to toggle)
dnprogs 2.52
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,644 kB
  • ctags: 4,021
  • sloc: ansic: 26,737; cpp: 10,666; makefile: 832; sh: 537; awk: 13
file content (35 lines) | stat: -rw-r--r-- 972 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Class for FAL server. This class receives messages and passes them down to
// fal_task objects that do the real work.
// It is the basic child of the FAL listener and encapsulates the job of a
// forked process that handles a single connection.
//
// The only DAP message handled by the server is the mandatory CONFIG message,
// all others are passed down to dap_task classes.

class fal_server
{
  public:
    fal_server(dap_connection &c, fal_params &p):
	conn(c),
	verbose(p.verbosity),
	params(p)
	{}
    ~fal_server() {};
    bool run();
    void closedown();
    
 private:
    void create_access_task(dap_message *m);
    bool exchange_config();
    const char *func_name(int);
    
    dap_connection    &conn;
    fal_task          *current_task;
    int                verbose;
    bool               need_crcs;
    struct fal_params  params;

    dap_attrib_message  *attrib_msg;
    dap_alloc_message   *alloc_msg;
    dap_protect_message *protect_msg;
};