server header, main function, socket wrappers