Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
> > Actually, it's even worse than that. For a standard install, I can use > only one type per platform. It has to be either SOCKET or UINT_PTR on all > Windows platforms. I don't know why there are two different types used on Windows, but this aspect of fd_t has been there since the initial commit by sustrik in 2009. ZMQ_FD has this behavior already (and has been that way since 2009 as well). For ZMQ_FD there is a clearly defined use case; the FD is passed off to whatever platform event demultiplexor you happen to have (epoll, kqueues, select), and so it must be the type the underlying platform uses for these system calls. It is not clear to me what you can practically do with the value returned from ZMQ_IDENTITY_FD except treat it opaquely (it certainly is not safe to do raw socket IO calls with it I would expect). On Wed, Jan 7, 2015 at 8:16 PM, Peter Kleiweg wrote: > > > Peter Kleiweg schreef op 8 januari 2015 03:08:50 CET: > > > > > > Thomas Rodgers schreef op 8 januari 2015 > > 02:56:18 CET: > > > FD ~= "file descriptor". > > > > > > fd_t, the type this option actually returns, is conditionally > > defined > > > to be > > > int or SOCKET depending on platform, same as with ZMQ_FD. It is > > > however, > > > not the same FD that would be returned by the ZMQ_FD option (I > > believe > > > it > > > is the underlying TCP file descriptor or SOCKET in this case). > > > > > > > I have looked to the source. > > > > On non-Windows, it is an int. No problem. > > > > On Windows, it is either a SOCKET or a UINT_PTR. This is impossible. I > > write a Go binding[1] based on the C API. I need to know what the type > > is on Windows, and the C header file doesn't tell. > > > > Actually, it's even worse than that. For a standard install, I can use > only one type per platform. It has to be either SOCKET or UINT_PTR on all > Windows platforms. > > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
> > And if fd_t is internal to the C++ code, why is it used in the C API > reference? As I noted - > Also, fd_t is an internal definition, not exposed in zmq.h so it probably > shouldn't 'leak' into the interface documentation. If these are compelling > enough deficiencies, *perhaps filing a Github issue would be in order*? On Wed, Jan 7, 2015 at 8:08 PM, Peter Kleiweg wrote: > > > Thomas Rodgers schreef op 8 januari 2015 02:56:18 > CET: > > FD ~= "file descriptor". > > > > fd_t, the type this option actually returns, is conditionally defined > > to be > > int or SOCKET depending on platform, same as with ZMQ_FD. It is > > however, > > not the same FD that would be returned by the ZMQ_FD option (I believe > > it > > is the underlying TCP file descriptor or SOCKET in this case). > > > > I have looked to the source. > > On non-Windows, it is an int. No problem. > > On Windows, it is either a SOCKET or a UINT_PTR. This is impossible. I > write a Go binding[1] based on the C API. I need to know what the type is > on Windows, and the C header file doesn't tell. > > And if fd_t is internal to the C++ code, why is it used in the C API > reference? > > > [1] http://github.com/pebbe/zmq4 > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
Peter Kleiweg schreef op 8 januari 2015 03:08:50 CET: > > > Thomas Rodgers schreef op 8 januari 2015 > 02:56:18 CET: > > FD ~= "file descriptor". > > > > fd_t, the type this option actually returns, is conditionally > defined > > to be > > int or SOCKET depending on platform, same as with ZMQ_FD. It is > > however, > > not the same FD that would be returned by the ZMQ_FD option (I > believe > > it > > is the underlying TCP file descriptor or SOCKET in this case). > > > > I have looked to the source. > > On non-Windows, it is an int. No problem. > > On Windows, it is either a SOCKET or a UINT_PTR. This is impossible. I > write a Go binding[1] based on the C API. I need to know what the type > is on Windows, and the C header file doesn't tell. > Actually, it's even worse than that. For a standard install, I can use only one type per platform. It has to be either SOCKET or UINT_PTR on all Windows platforms. -- Peter Kleiweg http://pkleiweg.home.xs4all.nl ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
Thomas Rodgers schreef op 8 januari 2015 02:56:18 CET: > FD ~= "file descriptor". > > fd_t, the type this option actually returns, is conditionally defined > to be > int or SOCKET depending on platform, same as with ZMQ_FD. It is > however, > not the same FD that would be returned by the ZMQ_FD option (I believe > it > is the underlying TCP file descriptor or SOCKET in this case). > I have looked to the source. On non-Windows, it is an int. No problem. On Windows, it is either a SOCKET or a UINT_PTR. This is impossible. I write a Go binding[1] based on the C API. I need to know what the type is on Windows, and the C header file doesn't tell. And if fd_t is internal to the C++ code, why is it used in the C API reference? [1] http://github.com/pebbe/zmq4 -- Peter Kleiweg http://pkleiweg.home.xs4all.nl ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
FD ~= "file descriptor". fd_t, the type this option actually returns, is conditionally defined to be int or SOCKET depending on platform, same as with ZMQ_FD. It is however, not the same FD that would be returned by the ZMQ_FD option (I believe it is the underlying TCP file descriptor or SOCKET in this case). I am *not* the author of this option, I don't know the intended use case for it. Also, fd_t is an internal definition, not exposed in zmq.h so it probably shouldn't 'leak' into the interface documentation. If these are compelling enough deficiencies, perhaps filing a Github issue would be in order? On Wed, Jan 7, 2015 at 3:37 PM, Peter Kleiweg wrote: > Thomas Rodgers schreef op de 7e dag van de louwmaand van het jaar 2015: > > > > > > > ZMQ_IDENTITY_FD is get only? > > > > > > Yes, given a previously set socket identity (see ZMQ_IDENTITY in > > http://api.zeromq.org/4-1:zmq-setsockopt), it will return the FD of the > > socket associated with that identity. > > What is an FD? A file descriptor? What is an fd_t? > > There is an option ZMQ_FD that returns a file descriptor. That > is int or SOCKET, for non-windows or windows. Is this similar? > > > > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl/ > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
Thomas Rodgers schreef op de 7e dag van de louwmaand van het jaar 2015: > > > > ZMQ_IDENTITY_FD is get only? > > > Yes, given a previously set socket identity (see ZMQ_IDENTITY in > http://api.zeromq.org/4-1:zmq-setsockopt), it will return the FD of the > socket associated with that identity. What is an FD? A file descriptor? What is an fd_t? There is an option ZMQ_FD that returns a file descriptor. That is int or SOCKET, for non-windows or windows. Is this similar? -- Peter Kleiweg http://pkleiweg.home.xs4all.nl/ ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
For completeness sake, I also added an issue to record the lack of documentation for ZMQ_SOCKS_PROXY - https://github.com/zeromq/libzmq/issues/1288 On Wed, Jan 7, 2015 at 9:50 AM, Pieter Hintjens wrote: > Thomas, thanks for summarizing that. I see that ZMQ_SOCKS_PROXY isn't > documented yet. > > On Wed, Jan 7, 2015 at 4:04 PM, Thomas Rodgers > wrote: > > GSSAPI is documented - > > > > http://api.zeromq.org/4-1:zmq-gssapi > > > > all of the ZMQ_Xxx items are options are additive and documented - > > > > http://api.zeromq.org/4-1:zmq-setsockopt > > > > With the exception of ZMQ_SRCFD and ZMQ_SHARED which are message > properties, > > documented - > > > > http://api.zeromq.org/4-1:zmq-msg-get > > > > zmq_msg_gets() and zmq_has() are new API functions, also documented - > > > > http://api.zeromq.org/4-1:zmq-msg-gets > > http://api.zeromq.org/4-1:zmq-has > > > > On Wed, Jan 7, 2015 at 8:55 AM, Peter Kleiweg > wrote: > >> > >> > >> From the NEWS file: > >> > >> 0MQ version 4.1.0 rc1, released on 2014/10/14 > >> = > >> > >> * All issues that were fixed in 4.0.x > >> > >> * Improved client reconnection strategy on errors > >> > >> * GSSAPI security mechanism > >> > >> * SOCKS5 support (ZMQ_SOCKS_PROXY) > >> > >> * ZMQ_ROUTER_HANDOVER > >> > >> * ZMQ_TOS > >> > >> * ZMQ_CONNECT_RID > >> > >> * ZMQ_HANDSHAKE_IVL > >> > >> * ZMQ_IDENTITY_FD > >> > >> * ZMQ_XPUB_NODROP > >> > >> * ZMQ_SRCFD and ZMQ_SHARED message options > >> > >> * Message metadata -- zmq_msg_gets () > >> > >> * Probe library configuration -- zmq_has () > >> > >> Can someone please give an overview of how these things effect > >> the C API? What are new functions? What functions have changed? > >> What options were added or changed (or removed)? > >> > >> > >> > >> -- > >> Peter Kleiweg > >> http://pkleiweg.home.xs4all.nl/ > >> ___ > >> zeromq-dev mailing list > >> zeromq-dev@lists.zeromq.org > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > > > ___ > > zeromq-dev mailing list > > zeromq-dev@lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
> > I don't see any documentation for ZMQ_XPUB_NODROP Issue submitted - https://github.com/zeromq/libzmq/issues/1287 On Wed, Jan 7, 2015 at 11:48 AM, Peter Kleiweg wrote: > Thomas Rodgers schreef op de 7e dag van de louwmaand van het jaar 2015: > > > GSSAPI is documented - > > > > http://api.zeromq.org/4-1:zmq-gssapi > > > > all of the ZMQ_Xxx items are options are additive and documented - > > ZMQ_IDENTITY_FD is get only? > > I don't see any documentation for ZMQ_XPUB_NODROP > > > > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl/ > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
> > ZMQ_IDENTITY_FD is get only? Yes, given a previously set socket identity (see ZMQ_IDENTITY in http://api.zeromq.org/4-1:zmq-setsockopt), it will return the FD of the socket associated with that identity. On Wed, Jan 7, 2015 at 11:48 AM, Peter Kleiweg wrote: > Thomas Rodgers schreef op de 7e dag van de louwmaand van het jaar 2015: > > > GSSAPI is documented - > > > > http://api.zeromq.org/4-1:zmq-gssapi > > > > all of the ZMQ_Xxx items are options are additive and documented - > > ZMQ_IDENTITY_FD is get only? > > I don't see any documentation for ZMQ_XPUB_NODROP > > > > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl/ > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
Thomas Rodgers schreef op de 7e dag van de louwmaand van het jaar 2015: > GSSAPI is documented - > > http://api.zeromq.org/4-1:zmq-gssapi > > all of the ZMQ_Xxx items are options are additive and documented - ZMQ_IDENTITY_FD is get only? I don't see any documentation for ZMQ_XPUB_NODROP -- Peter Kleiweg http://pkleiweg.home.xs4all.nl/ ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
Thomas, thanks for summarizing that. I see that ZMQ_SOCKS_PROXY isn't documented yet. On Wed, Jan 7, 2015 at 4:04 PM, Thomas Rodgers wrote: > GSSAPI is documented - > > http://api.zeromq.org/4-1:zmq-gssapi > > all of the ZMQ_Xxx items are options are additive and documented - > > http://api.zeromq.org/4-1:zmq-setsockopt > > With the exception of ZMQ_SRCFD and ZMQ_SHARED which are message properties, > documented - > > http://api.zeromq.org/4-1:zmq-msg-get > > zmq_msg_gets() and zmq_has() are new API functions, also documented - > > http://api.zeromq.org/4-1:zmq-msg-gets > http://api.zeromq.org/4-1:zmq-has > > On Wed, Jan 7, 2015 at 8:55 AM, Peter Kleiweg wrote: >> >> >> From the NEWS file: >> >> 0MQ version 4.1.0 rc1, released on 2014/10/14 >> = >> >> * All issues that were fixed in 4.0.x >> >> * Improved client reconnection strategy on errors >> >> * GSSAPI security mechanism >> >> * SOCKS5 support (ZMQ_SOCKS_PROXY) >> >> * ZMQ_ROUTER_HANDOVER >> >> * ZMQ_TOS >> >> * ZMQ_CONNECT_RID >> >> * ZMQ_HANDSHAKE_IVL >> >> * ZMQ_IDENTITY_FD >> >> * ZMQ_XPUB_NODROP >> >> * ZMQ_SRCFD and ZMQ_SHARED message options >> >> * Message metadata -- zmq_msg_gets () >> >> * Probe library configuration -- zmq_has () >> >> Can someone please give an overview of how these things effect >> the C API? What are new functions? What functions have changed? >> What options were added or changed (or removed)? >> >> >> >> -- >> Peter Kleiweg >> http://pkleiweg.home.xs4all.nl/ >> ___ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] C API changes for ZeroMQ 4.1.0
GSSAPI is documented - http://api.zeromq.org/4-1:zmq-gssapi all of the ZMQ_Xxx items are options are additive and documented - http://api.zeromq.org/4-1:zmq-setsockopt With the exception of ZMQ_SRCFD and ZMQ_SHARED which are message properties, documented - http://api.zeromq.org/4-1:zmq-msg-get zmq_msg_gets() and zmq_has() are new API functions, also documented - http://api.zeromq.org/4-1:zmq-msg-gets http://api.zeromq.org/4-1:zmq-has On Wed, Jan 7, 2015 at 8:55 AM, Peter Kleiweg wrote: > > From the NEWS file: > > 0MQ version 4.1.0 rc1, released on 2014/10/14 > = > > * All issues that were fixed in 4.0.x > > * Improved client reconnection strategy on errors > > * GSSAPI security mechanism > > * SOCKS5 support (ZMQ_SOCKS_PROXY) > > * ZMQ_ROUTER_HANDOVER > > * ZMQ_TOS > > * ZMQ_CONNECT_RID > > * ZMQ_HANDSHAKE_IVL > > * ZMQ_IDENTITY_FD > > * ZMQ_XPUB_NODROP > > * ZMQ_SRCFD and ZMQ_SHARED message options > > * Message metadata -- zmq_msg_gets () > > * Probe library configuration -- zmq_has () > > Can someone please give an overview of how these things effect > the C API? What are new functions? What functions have changed? > What options were added or changed (or removed)? > > > > -- > Peter Kleiweg > http://pkleiweg.home.xs4all.nl/ > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev