added initial client processing loop.
moved server lookup to resolve.h