added inetd handling code; still needs work