diff options
author | miau <miaukatzemiau@priveasy.de> | 2011-06-05 12:14:34 (GMT) |
---|---|---|
committer | miau <miaukatzemiau@priveasy.de> | 2011-06-05 12:14:34 (GMT) |
commit | 2ff4666452ee56f4d6c51b7050dbe77456110d2f (patch) | |
tree | e5d4d3a17b3bc84902d9a8bed22b42b25d05df67 /common.h | |
parent | ff98567423ed50673ea42404b6c5a32f011850af (diff) |
add receiver loop, service multiplexing, common.h
* Service multiplexing
Broadcaster call signature is changed to
broadcaster host service [message]
to acommodate multiple sevices listening on the same port for
broadcast information.
* Receiver Loop
Listener now loops infinitely instead of returning after the first
packet. For each packet with the content service[,message] the
programm
service [message]
will be executed. Upward directory traversal is prohibited (and
detected).
To prevent DoS only one service program runs concurrently.
* Common.h
Port numbers and maximum message sizes are now stored in
common.h. Broascaster respects max. message size.
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common.h b/common.h new file mode 100644 index 0000000..c64c764 --- /dev/null +++ b/common.h @@ -0,0 +1,8 @@ +#ifndef UDP_BROADCAST_COMMON +#define UDP_BROADCAST_COMMON + +#define SERVERPORT 4950 // the port users will be connecting to +#define SERVERPORT_S "4950" +#define MAXBUFLEN 100 + +#endif // UDP_BROADCAST_COMMON |