I have a server which serves 2 different type of clients via 2 different
mechanisms:
- it serves HTML pages to end users via HTTPs,
- it maintain connections from software agents via proprietary protocol
over SSL.
I employ Jetty on "end user" side and Mina on "software agent" side. It works
very well. My only problem is that I have to listen on two different ports.
Ideally I would love to be able to listen on single port (HTTPS) and dispatch
incoming connections to Jetty or Mina depending on some criteria (I was
thinking to use remote port number as such criteria, I can force all software
agents to use the same port number to connect to my server). On Jetty side, I
can get my hands on newly accepted SocketChannel and I think I will be able to
"convince" Jetty to leave it alone - the problem is how to make Mina to use
this SocketChannel?
Bottom line: Is there way to create functional IoSession based on existing
SocketChannel?
You comments will be highly appreciated.
Andrei