osd-contiki/apps/telnetd
Oliver Schmidt d4f49fa204 Added explicit rejection of multiple connections.
Although a simple solution the recently introduced approach to just not listen to incoming connetions if there's already one has the downside that one doesn't know if a connection fails because the server is down or becuase there's a connection.
Therefore now connections are always accepted but after sending a message to the user and waiting a few seconds they are closed.
The appstate is used used in a somewhat unusual way here: The one and only "active" connection has an appstate of 0. For all other connections the appstate is initially set to 1. Then it is increased on every uIP poll until it reaches 10, which triggers the connection close. This somewhat hacky approach allows to keep track of the rejected sessions without any additional state variables and/or timers.
2011-05-21 21:03:04 +02:00
..
Makefile.telnetd - It doesn't make sense to me add the shell sources here _AND_ link to the shell app. 2008-03-28 22:40:55 +00:00
telnetd-dsc.c *-dsc.c files have been changed to remove forward reference for struct_icon variable, bacause it is strange that this variable is used wholly inside the C source file and declared extern for the forward reference. 2007-09-06 01:36:10 +00:00
telnetd-dsc.h Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00
telnetd-gui.c Include wget shell command in "standard" shell environments. 2008-11-10 22:10:32 +00:00
telnetd.c Added explicit rejection of multiple connections. 2011-05-21 21:03:04 +02:00
telnetd.h Adjusted telnet server to the new shell logic. 2008-02-09 17:15:58 +00:00