Code example for Socket

Methods: getLocalPort