File: uhub.dot

package info (click to toggle)
uhub 0.4.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,420 kB
  • ctags: 2,241
  • sloc: ansic: 18,124; xml: 575; perl: 568; sh: 368; makefile: 24
file content (59 lines) | stat: -rw-r--r-- 1,790 bytes parent folder | download | duplicates (6)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
 * Overview of uHub
 */
digraph G
{

	"main()" -> "event_dispatch()"
	
	"event_dispatch()" -> "net_on_accept()"
	"event_dispatch()" -> "net_on_read()"
	"event_dispatch()" -> "net_on_write()"
	"event_dispatch()" -> "event_queue_process()"

	/* net events */
	"net_on_write()" -> "net_send()"
	"net_on_write()" -> "user_disconnect()"
	"net_on_accept()" -> "user_create()"
	"net_on_read()" -> "net_recv()"
	"net_on_read()" -> "user_disconnect()"
	
	"net_recv()" -> "hub_handle_message()"
	
	/* adc message handling */
	"hub_handle_message()" -> "hub_handle_password()"
	"hub_handle_message()" -> "hub_handle_support()"
	
	"hub_handle_password()" -> "user_disconnect()"
	"hub_handle_support()" -> "user_disconnect()"
	"hub_handle_password()" -> "route_to_user()"
	"hub_handle_support()" -> "route_to_user()"
	
	"hub_handle_message()" -> "hub_handle_info()"
	"hub_handle_message()" -> "route_message()"
	"hub_handle_info()" -> "route_to_user()"
	"hub_handle_info()" -> "route_to_all()"
	
	/* message routing, depending on message type */
	"route_message()" -> "route_to_user()"
	"route_message()" -> "route_to_all()" -> "route_to_user()"
	"route_message()" -> "route_to_subscribers()" -> "route_to_user()"
	
	"route_to_user()" -> "net_send()"
	"route_to_user()" -> "queue_command()"
	"route_to_user()" -> "user_disconnect()"
	
	
	/* Message dispatcher */
	"event_queue_process()" -> "hub_event_dispatcher()"
	"hub_event_dispatcher()" -> "EVENT_USER_JOIN"
	"hub_event_dispatcher()" -> "EVENT_USER_QUIT"
	"EVENT_USER_QUIT" -> "route_to_all()"
	"EVENT_USER_QUIT" -> "user_destroy()"
	"EVENT_USER_JOIN" -> "route_to_all()"
	
	/* user_disconnect() -- critical part */
	"user_disconnect()" -> "user_set_state(state_cleanup)" -> "post: EVENT_USER_QUIT"
	"user_disconnect()" -> "user_destroy()"
	
}