set port in constructor not register()