From: Greg W. <gr...@mo...> - 2006-02-17 12:36:52
|
sorry to come to this conversation late.... I just added getLocalPort() to the connector API that will report the actual port the connector is listening on. I also too the opportunity to remove the use of SocketAddress as it was preventing the BIO connector being used on older JVMs. this is in SVN trunk now. cheers Millington, Steve wrote: > I am trying to integrate Jetty6 as part of my unit testing suite. I will > be wanting to connect to my jetty server using HTTP, and therefore am > using one of the various connectors in Jetty6. > > When I specify the connector, I specify a port upon which to listen. For > my test suite I want any number of these tests to be run at any time by > any users (it is a unix box after all!). For traditional ServerSocket > stuff, I can specify the port as zero, and then find out the actual port > build listened to by using the getLocalPort() method of ServerSocket. > What I want is to be able to do the same with Jetty. > > My question then - can I get hold of the information about which port a > connector is actually listening on? It seems that the SocketEndPoint has > such a thing, but how do I get hold of the SocketEndPoint for a > particular connector? > > Thanks > > Steve > |