Fix. socket:poll() method allows only ZMQ_POLLIN flag.
Fix. Create some global variables.