acfd = announce("tcp!*!7", adir); if(acfd < 0) return -1; for(;;){ /* listen for a call */ lcfd = listen(adir, ldir); if(lcfd < 0) return -1; /* fork a process to echo */ switch(fork()){ case -1: perror("forking"); close(lcfd); break; case 0: /* accept the call and open the data file */ dfd = accept(lcfd, ldir); if(dfd < 0) return -1; print(„incoming request“); write(dfd, buf, sizeof(buf)); exits(nil); default: close(lcfd); break; }
}
}
void
main()
{
bekremvax();
exits(nil);
}
in my browser I’m getting an empty page and with netcat the following output:
nc -v 10.211.55.3 7
Connection to 10.211.55.3 port 7 [tcp/discard] succeeded!
HTTP/1.1%
there is also no print statement („incoming request“) when I’m trying to reach the service via browser. am I doing something wrong? 9front is running in a vm at the moment, but as far as I can tell there weren’t any issues regarding the network.
thank you very much in advance!
best regards,
Sascha