private int getPort ( URI endpoint ) { if ( endpoint . getPort ( ) != - 1 ) { return endpoint . getPort ( ) ; } else if ( "https" . equals ( endpoint . getScheme ( ) ) ) { return 443 ; } else { return 80 ; } }
Netty needs an explicit port so resolve that from the endpoint provided .