On Thu, 2008-02-21 at 12:53 -0500, Josh wrote:
> Hello,
> 
> I am examining qpid/cpp/src/qpid/sys/posix/Socket.cpp.
> 
> It appears that the SocketPrivate class contains the address and port 
> information for a Socket.
> 
> It seems as if this is the appropriate class to which to add SSL elements 
> such as private key, certificate, parameters, etc.  Is my assertion 
> correct?

I'm afraid probably not.

You'll probably need to implement something parallel to the Socket class
(something like SSLSocket) to fit in with the (implied) architecture.

Essentially Socket is a ?quick? hack for monitoring an fd with poll()
type functionality. As at the time we only monitor Sockets I didn't
bother to create an abstract fd type and use that instead, but I'm
working on something else (ibverbs Infiband support) that will force me
to abstract monitorable things (fds on Unix) away from Sockets or
whatever else sits on top of them.

So essentially you'll need to implement a parallel class to Socket which
can expose an fd that could be put into the Poller() abstraction.

If you're interested in patterns the i/o of the C++ broker is a Proactor
sitting on top of a Reactor. With the Proactor simulating asynch IO for
TCP sockets; for Infiniband there will be direct asynch IO.

I hope that is clear enough for you to get an idea of the architecture
you'll need to use. If not then we can discuss this further. Let me know
what you end up with and I'll try to provide help.

Andrew


Reply via email to