I'm new to Poco and have a few questions. I'm using Poco::TCPServer in a custom gateway, passing many client requests (slightly modified) to one external server whose responses get reflected back to each client. Both client and external server interfaces require SSL.
My first question is about binding SSL to the "listener" socket. I realize I can use the SecureStreamSocket::attach(), but I'm not sure where. Is the class using TCP sessions (Virtual Circuits)? Should I do the attach on the single socket in my implementation of the myServerApplication or each instance of myTCPServerConnection?
My second question regards opening secure sockets to the external server. Again, I could do this in myTCPServerConnection, but it seems a waist to go through handshaking for every request; especially when there's only one external server. I had a thought about overriding the TCPServer's thread spawning to add a socket there that can be reused. Any ideas how this could be efficiently implemented?
I had no luck finding anything similar in example code, discussions in this forum, or in a Google search. I'm just not sure if I'm on the right track. Comments and advice from the Poco community is much appreciated.
Thanks in advance, Rt_Bower