No, get rid of those fork() calls. Why do you want to start a separate process for each connection? And why don't you just use Qt networking capabilities instead of using the blocking low-level BSD socket interface? Currently you are doing everything wrong here