Code Monkey home page Code Monkey logo

tlszmq's People

Contributors

bertjwregeer avatar binki avatar ianbarber avatar vpnwr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tlszmq's Issues

a little question about your code

Firstly, I have to say that your code really do me a big favour during my recent work. Thanks a lot.

I got a little problem trying to understand some specific sentences in your project----- "socket->send( *request, ZMQ_SNDMORE );", In read_message(...) of the file tlsserver.cpp. In my opinion, the content of "request" is the sender identity(according to the comments), why we have to send it back to the sender? Does it associate with the ssl handshake ?

May be I take it in a wrong way, hope that you can give me some tips to help me understand it right.

Thanks for your time.

Question on design

Is there a particular rational behind writing the code as a "third party helper" ... not sure what the best term is actually ... instead of transparently wrapping the socket?

From a quick look over the code it seems as though it could be modified easily enough to not require the manual pass in/pass out mechanics, but rather give it the socket and let the tls class do the reading/writing to zmq.
Doing it as a wrapper does lose some flexibility in packet format, but not too much... you'd either have to build the envelope as (ID,Null,Encrypted payload) or prepend/append the payload like (ID, Null, [[arbitary, Null], ...], Encrypted payload). Essentially sacrificing flexibility for code reduction.

As I'm following the code, the input is wrapped in zmq message objects, but it's actually processing it on the basis of a binary stream... that would need to be adjusted for more complicated multipart messages?
I'm not seeing anything to handle message delimiting either ... is it a safe assumption that this code is intended for emulating a stream rather than datagram series, with all the messages being concated together and splitting being purely based on how much of the message has been decoded when you ask if it has data?

What's your thoughts on using an inproc transport for passing data in and out of the tls code?
Something like creating the desired type of ZMQ socket and throwing it off in to a worker thread, then talking to the worker over inproc... the worker takes packets in, strips the envelope, encrypts/decrypts the payload, puts the envelope back on, then passes it off to the socket on other side. Success would likely vary with socket type, ROUTER and PUB/SUB should work well, REQ/REP and PUSH/PULL might not be so good.

License for Usage

Ian - Great work and blog post on on this example - I found it very helpful. I couldn't seem to find a license for the usage of this code. Does one exist? Or would you mind adding a license for the use of tlszmq code or for creating derived works?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.