HBPVIS / ZeroEQ

Cross-platform C++ library for fast binary and REST messaging
https://hbpvis.github.io/
Other
41 stars 25 forks source link

Spec: clearer http::Server registration methods #177

Closed eile closed 8 years ago

favreau commented 8 years ago

+1

rdumusc commented 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 );

eile commented 8 years ago

A few comments, let's discuss tomorrow:

eile commented 8 years ago
rdumusc commented 8 years ago

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 :-)