[Simpleweb-Support] Shared services
Brought to you by:
niallg
|
From: Christophe R. <cr...@ac...> - 2004-08-31 18:46:20
|
I try to share a service between multiple connections:
Connection connection = ConnectionFactory.getConnection(handler
for (int i=_fromPort; i<=_toPort; ++i) {
_logger.debug("starting socket on port: ["+i+"]");
connection.connect(new ServerSocket(i));
}
It seems to work fine.
I just wonder how I can know the port from the service. It's possible to get
the IPAddress:
public void process(Request req, Response resp) throws Exception {
req.getInetAddress();
...
}
But can I also get the port?
Christophe
|