gar1t/erlang-czmq — pull request #22 by artemav (2014-07-24 15:07:20+00:00)
Title: The polling inside of czmq port

The current polling way czmq_poller.erl is inefficient right now. I tried to resolve this flaw by adding a new ability to create a poller on the port side and receive messages from a socket asynchronously.
I replaced simple inner loop with event loop thus each command coming from the erlang is an event. If a command of creation a new poller is occured than the port adds new timer to the event loop. The timer checks a socket for the presence of a 'hot' frame, pulls the frame and sends it to the erlang. The czmq.erl services as a proxy: receives the port answers, frames and forwards them to the clients.