Closed eile closed 8 years ago
This is a complex topic :-) Maybe let's discuss it offline tomorrow, but here are already a few thoughts:
Since I started thinking about it, a unified API usable for both binary and http server could look something like this: _server.add( camera ); // defaut to zeroeq::ReadWrite _server.add( frame, zeroeq::ReadOnly ); // or zeroeq::OUT _server.add( httpCommand, zeroeq::WriteOnly ); // or zeroeq::IN _server.add( "myapp/getinfo", myGetFunc ); _server.add( "myapp/setoption", mySetFunc ); _server.remove( anything ); And for the "publish" or "send event" actions (N/A for http server): _server.send( camera ); _server.send( event ); _server.send( event, data, size );
A few comments, let's discuss tomorrow:
Yes, I jumped a step in the example above in assuming we would at some point introduce a zeroeq::Server which is a Publisher with support for req/rep, something I have had in mind for some time :-)
+1