On Tue, Mar 22, 2011 at 11:20 PM, Martin Lucina <[email protected]> wrote:
> 1) pass a sockaddr_in.port of 0 to a bind() call for a TCP or UDP socket. > 2) call getsockname() to retrieve the actual port number the system > assigned. FWIW this can also be done trivially in user space by starting at a random port and trying to bind until it works. It's not beautiful but it does let you assign ports within ranges, and the functionality can be done entirely in the language binding, does not require 0MQ API support at all. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
