/** * Finds a free socket upon first calll and returns the same for every next call. * * @return a free port (from first call) * * @throws RuntimeException if no port has been found. (TODO change this to an apropriate checked exception) */ public int getPort() { if( m_found == -1 ) { m_found = findFree(); } return m_found; }