lib/czmq-ffi-gen/czmq/ffi/zsys.rb in czmq-ffi-gen-0.16.1 vs lib/czmq-ffi-gen/czmq/ffi/zsys.rb in czmq-ffi-gen-1.0.0

- old
+ new

@@ -733,10 +733,20 @@ def self.ipv6() result = ::CZMQ::FFI.zsys_ipv6() result end + # Test if ipv6 is available on the system. Return true if available. + # The only way to reliably check is to actually open a socket and + # try to bind it. (ported from libzmq) + # + # @return [Boolean] + def self.ipv6_available() + result = ::CZMQ::FFI.zsys_ipv6_available() + result + end + # Set network interface name to use for broadcasts, particularly zbeacon. # This lets the interface be configured for test environments where required. # For example, on Mac OS X, zbeacon cannot bind to 255.255.255.255 which is # the default when there is no specified interface. If the environment # variable ZSYS_INTERFACE is set, use that as the default interface name. @@ -793,9 +803,49 @@ # set. # # @return [String] def self.ipv6_mcast_address() result = ::CZMQ::FFI.zsys_ipv6_mcast_address() + result + end + + # Set IPv4 multicast address to use for sending zbeacon messages. By default + # IPv4 multicast is NOT used. If the environment variable + # ZSYS_IPV4_MCAST_ADDRESS is set, use that as the default IPv4 multicast + # address. Calling this function or setting ZSYS_IPV4_MCAST_ADDRESS + # will enable IPv4 zbeacon messages. + # + # @param value [String, #to_s, nil] + # @return [void] + def self.set_ipv4_mcast_address(value) + result = ::CZMQ::FFI.zsys_set_ipv4_mcast_address(value) + result + end + + # Return IPv4 multicast address to use for sending zbeacon, or NULL if none was + # set. + # + # @return [String] + def self.ipv4_mcast_address() + result = ::CZMQ::FFI.zsys_ipv4_mcast_address() + result + end + + # Set multicast TTL default is 1 + # + # @param value [Integer, #to_int, #to_i] + # @return [void] + def self.set_mcast_ttl(value) + value = Integer(value) + result = ::CZMQ::FFI.zsys_set_mcast_ttl(value) + result + end + + # Get multicast TTL + # + # @return [Integer] + def self.mcast_ttl() + result = ::CZMQ::FFI.zsys_mcast_ttl() result end # Configure the automatic use of pre-allocated FDs when creating new sockets. # If 0 (default), nothing will happen. Else, when a new socket is bound, the