Adding to dos.
Allow server option to be a function as well as a string.