
  This file tries to (sort of) document how messages and events are passed
  through the code. It might eventually help someone find a place to stick
  his/her own code in.

Incoming connection:
	
	1. csock.c: Noticed by select_loop lq (listen queue) check
		which calls method lq->accept
	2. af_xxxx.c: xxxx_accept prepares the socket, calls sock_login
	3. csock.c: sock_login calls auth_login for authenticated listeners
		(INET for the moment), luser_login for others
		(auth_login calls luser_login)
	4. luser.c: luser_login either prepares the local user (and calls
		lnuser_login), or calls link_login if the user appears to
		be an incoming linker

Incoming disconnection:
	
	1: csock.c: Noticed by sock_read (returns EOF), select_loop calls
		sock_close
	2: sock_close calls s->disc_handler 
	3: disc_handler clears data structures for the user, link, whatever
	4: sock_close clears data structures for the socket
	
Incoming data:
	
	1: csock.c: Noticed by select_loop, calls sock_read to read data to
		buffer and do optional decompression
	2: csock.c: select_loop calls sock_handle, which does optional
		telnet negotiation, optional EOL searching for eol_text
		sockets and calls s->in_handle method (which points to
		luser_handler, pc_handler, etc)

Outgoing data:
	
	1: whatever calls csprintf, csputc, csputs, or something
	2: csock.c: csprintf calls csputs calls csputc
	3: cputc does optional EOL conversion, calls cswritec
	4: cswritec does optional telnet negotiation, calls csrwritec
	5: csrwritec stuffs the data to buffer, and if buffer is full, 
		csrwritec does optional compression and calls csrflush 
		to send the data.
	6: Else, the data is flushed when someone calls csflush(), which
		does the optional compression and calls csrflush.
		csflush() is called by csflush_all once every second
		(off the timer).
	
PC link message reception:
	
	1: net_pc.c: pc_handler	calls parse_pc to do the ^ argument parsing
		and finds the correct handler method from the pcmds table,
		calls the pc_NN handler
	2: net_pc.c: pc_NN handler parses the message, for messages
		containing data allocates data structure and stuffs the
		fields to the structure, calls the relevant net_XXX handler
	3: network.c: net_XXX inserts data to local memory structures
		(and files), calls user_XXX to send the data to local users,
		calls link_XXX to send the data to links
	4: cluster.c: user_XXX sends data to local users which are interested
		in the data
	5: net_link.c: link_XXX calls pc_XXX to send the data to PC links
		(will later call cll_XXX to send clulink messages too)
	6: net_pc.c: pc_XXX sends data to links using pc_send or pc_sendall
	
