use int instead of uint16 for port numbers to conform to the net package