Wednesday June 9, 2010
[Time] Name | Message |
---|---|
[06:41] jugg | grrr. inproc requires the bind to occur before connect? :( |
[06:42] sustrik | jugg: yes |
[06:42] sustrik | fixing it is on todo list |
[06:43] jugg | ok... back to managing thread startup synchronization :( |
[06:48] sustrik | jugg: don't you rather want to fix it in 0mq? it would be probably less hassle. |
[06:48] sustrik | i can give you pointers as where to look |
[06:49] jugg | please do |
[06:49] sustrik | ok, wait a sec |
[06:50] sustrik | have a look here: |
[06:50] sustrik | http://github.com/sustrik/zeromq2/blob/master/src/ctx.hpp#L144 |
[06:50] sustrik | it's a map of inproc endpoints created by binds |
[06:51] sustrik | when a socket connects to an inproc endpoint it checks this map and finds the socket that created it |
[06:51] sustrik | what's missing is a similar map of endpoint people wish to connect to, but which don't exist at the moment |
[06:53] sustrik | then have a look here: |
[06:53] sustrik | http://github.com/sustrik/zeromq2/blob/master/src/ctx.hpp#L144 |
[06:54] sustrik | sorry |
[06:54] sustrik | here: |
[06:54] sustrik | http://github.com/sustrik/zeromq2/blob/master/src/ctx.cpp#L260 |
[06:54] sustrik | register_endpoint is a function that's called when inproc bind is done |
[06:54] sustrik | aside of storing the name in the map |
[06:54] sustrik | it should check whether there are any sockets waiting to connect to the newly created endpoint |
[06:55] sustrik | and if so, connect them |
[06:56] jugg | ok, thanks. I'll look through it. |
[06:56] sustrik | the inproc connecting code is here: http://github.com/sustrik/zeromq2/blob/master/src/socket_base.cpp#L181 |
[06:56] sustrik | in overall, the whole thing has some 100-200 lines, so it should not be too complex to fix |
[10:25] mikko | ZMQ_SNDMORE is a flag to send rather than setsockopt, right? |
[10:29] sustrik | yes |
[10:30] sustrik | mikko: ZMQ_RCVMORE on the other hand is a socketopt |
[10:30] sustrik | it's kind of asymetric, but the API looks the least complex this way |
[10:42] mikko | rcvmore is uint64_t |
[10:42] mikko | ? |
[10:44] mikko | int64t |
[10:46] sustrik | int64_t |
[15:49] CIA-17 | zeromq2: 03Martin Sustrik 07master * r604f747 10/ src/poll.cpp : issue 32 - poll_t poller broken - http://bit.ly/aucae6 |
[23:43] travisbrady | sustrik: they are in the same os thread yes |