[zeromq-dev] Implementing UDP and changing socket event handler.
Pieter Hintjens
ph at imatix.com
Thu Jan 14 16:21:06 CET 2016
Hi Jangho,
I'm not competent to help on this but I wanted to just encourage you,
this would be an awesome transport in ZeroMQ, and I'm ready to help
with documentation and testing.
If it's any help, feel free to send even unfinished pull requests to
libzmq master, so that others can perhaps get involved in the work. As
long as you don't break existing tests, you can start with a dummy
udp:// transport that does nothing, and build this out piece by piece.
-Pieter Hintjens
On Thu, Jan 14, 2016 at 10:08 AM, Noh, Jangho <jangho.noh at wustl.edu> wrote:
> Hello folks,
>
> I'm trying to implement UDP transport in ZMQ using Lindley French's previous
> work.
> (https://zeromq.jira.com/browse/LIBZMQ-589)
>
> When POLLOUT is fired on the socket. The out_event function in io_object.cpp
> is called and it makes error saying below messages
>
> Assertion failed: false (src/io_object.cpp:116)
> Aborted (core dumped)
>
> void zmq::io_object_t::out_event ()
> {
> zmq_assert (false);
> }
>
> What I want to do is to call out_event function in udp_sender.cpp instead of
> one in io_object.cpp
> How can I change event handler for POLLOUT?
>
> The below is part of source code of udp_sender.cpp. Using set_pollout
> function seems not working
>
> void zmq::udp_sender_t::plug (io_thread_t *io_thread_, session_base_t
> *session_)
> {
>
> ...
> socket_handle = add_fd (socket);
> set_pollout (socket_handle);
>
> ...
>
> }
>
>
> I traced function calls and below is the log. First string is the file name
> and the second string after ':' is the function name.
>
> After "poller_base.cpp: execute_timers", out_event is called. And the
> program is aborted.
>
> zmq.cpp: zmq_sendmsg
> zmq.cpp: zmq_msg_send
> zmq.cpp: s_sendmsg
> zmq.cpp: zmq_msg_size
> signaler.cpp: wait
> signaler.cpp: recv
> object.cpp: process_command: socket_base.cpp: process_commands : process all
> available commands
> plug
> object.cpp: process_command: poller_base.cpp: get_load
> own
> signaler.cpp: wait
> session_base.cpp: start_connecting: UDP sender call
> socket_base.cpp: send: try to send the message: 0x7ffee6dd17e0
> xpub.cpp: xsend
> xpub.cpp: mark_as_matching
> io_object.cpp: plug
> v1_encoder.cpp: v1_encoder_t
> udp_sender.cpp: udp_sender_t
> udp_sender.cpp: init
> ip.cpp: open_socket: 10 2 17
> io_thread.cpp: unblock_socket
> object.cpp: process_command: attach
> session_base.cpp: process_attach
> udp_sender.cpp: plug
> poller_base.cpp: adjust_load
> signaler.cpp: wait
> poller_base.cpp: execute_timers
> io_object.cpp: out_event
>
>
> Appreciate your help.
>
>
> Sincerely,
>
> Jangho Noh
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
More information about the zeromq-dev
mailing list