add ServerController class. parseHeader function WIP.

still can't get correct IP address. need to be fixed. tons of bugs are
introduced by adding server-side function.