Added socket utility for finding open port.