added port and thread settings
give settings to NetworkService. Read port from options.