Make a server style socket Wait for a connection Fork If you are the child Read and check lots of words, printing answers If you are the parent loop back
The key to all of this is the 'fork' command. Please read the fork man page. You can find my notes on fork here.
You can find how to make a server style socket here.
You can find a dictionary of words at /usr/share/dict/words. The following code might help you remember how to use files.
ifstream infile("/usr/dict/words", ios::in); if (!infile) { perror("Unable to open file"); exit(1); } while (infile >> word) { cout << "I read " << word << endl; }
1 -- Can make a server style socket 1 -- Can accept a connection from the client 1 -- Can fork correctly 1 -- Can look up a single word 1 -- Can look up multiple words 1 -- Uses a binary search to do the lookup (or something fast) 1 -- Rejects all connections from some specified IP number -0.5 -- Each day after Tue Sep 28th