port should be uint16_t, not long