lib/0mq/socket.rb
# Receive a string from the socket
Receive a string from the socket
Receive a string from the socket
def recv_string(flags = 0)
      rc = LibZMQ.zmq_msg_init @msgptr
      ZMQ.error_check true if rc==-1
      rc = LibZMQ.zmq_recvmsg @pointer, @msgptr, flags
      ZMQ.error_check true if rc==-1
      str = LibZMQ.zmq_msg_data(@msgptr)
                  .read_string(LibZMQ.zmq_msg_size(@msgptr))
      rc = LibZMQ.zmq_msg_close @msgptr
      ZMQ.error_check true if rc==-1
      str
    end
def recv_string ( flags = 0 ) rc = LibZMQ . zmq_msg_init @msgptr ZMQ . error_check true if rc == - 1 rc = LibZMQ . zmq_recvmsg @pointer , @msgptr , flags ZMQ . error_check true if rc == - 1 str = LibZMQ . zmq_msg_data ( @msgptr ) . read_string ( LibZMQ . zmq_msg_size ( @msgptr ) ) rc = LibZMQ . zmq_msg_close @msgptr ZMQ . error_check true if rc == - 1 str end
Receive a string from the socket
Receive a string from the socket
flags
<not_specific>