root/handler.h

Revision fc4ae5ac4c3000ecb26d84ab72fe84f304e4bad5, 407 bytes (checked in by D.J. Capelis <dev@…>, 23 months ago)

Refactor: Less ugly, less broken and less painful. Cost: -40 lines.

I'm very pleased with this tradeoff. This refactor has been needed for
a long time. This should not only make services easier to write, but
should allow me to split out services into service modules now, which
has been a goal for awhile that this whole refactor needed to happen to
really do. Now we can just pass the socket structure to the modularized
services and for the most part most services will be able to do most of
what they need to do. There's going to still need to be some magic I
fear, but less.

Though given how simple things are, splitting these things out into
modules may not even be as necessary anymore.

  • Property mode set to 100644
Line 
1void * handle(void *);
2struct service * parse(size_t * offset, size_t * size, char * getbuffer, char * buffer, struct session * s);
3void send_header(struct session * s, int id, int flags, int len);
4void talkback_len(struct session * s, char * msg, int length);
5void talkback(struct session * s, char * msg);
6int gettalk(struct session * s, char * buffer, int length);
7
8#define NEW_PLEX 1
9#define DEL_PLEX 2
Note: See TracBrowser for help on using the browser.