Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
int(x[, base]) -> integer

Convert a string or number to an integer, if possible.  A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!)  When converting a string, use
the optional base.  It is an error to supply a base when converting a
non-string.  If base is zero, the proper base is guessed based on the
string content.  If the argument is outside the integer range a
long object will be returned instead.

src/p/y/pycast-HEAD/trunk/pycast1/pycast.py   pycast(Download)
            self.socket.bind(("", socket.INADDR_ANY))
 
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, self.ttl)
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_LOOP, 1)

src/p/y/pycast-HEAD/trunk/pycast2/pycast.py   pycast(Download)
            self.socket.bind(("", socket.INADDR_ANY))
 
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, self.ttl)
            self.socket.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_LOOP, 1)

src/s/u/substance-env-HEAD/Substance/src/substance/std/resource/net/bearers/mcast/mcast_connector.py   substance-env(Download)
            mcast_log.error(self.get_path(), "Cound not bind socket to group ", str(self.group))
        self.__sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(self.intf) + socket.inet_aton('0.0.0.0'))
        self.__sock.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(self.__address) + socket.inet_aton('0.0.0.0'))
 
 

src/a/t/Athena-Dependencies-Python-HEAD/Demo/sockets/mcast.py   Athena-Dependencies-Python(Download)
    if addrinfo[0] == socket.AF_INET: # IPv4
        mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
    else:
        mreq = group_bin + struct.pack('@I', 0)

src/p/o/posttroll-0.1/posttroll/bbmcast.py   posttroll(Download)
import time
import struct
from socket import (socket, AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_REUSEADDR,
                    SO_BROADCAST, IPPROTO_IP, IP_ADD_MEMBERSHIP, INADDR_ANY,
                    IP_MULTICAST_TTL, IP_MULTICAST_LOOP, SOL_IP, timeout,
 
        # Add group membership
        sock.setsockopt(IPPROTO_IP, IP_ADD_MEMBERSHIP, mreq)
 
    return sock, group or '<broadcast>'

src/c/i/circuits-bricks-0.3/circuits_bricks/net/sockets.py   circuits-bricks(Download)
        if addrinfo[0] == socket.AF_INET: # IPv4
            mreq = group_bin + struct.pack('=I', socket.INADDR_ANY)
            sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
        else:
            mreq = group_bin + struct.pack('@I', 0)

src/m/d/mdns-1.0.0/mdns/zeroconf.py   mdns(Download)
            s.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF,
                    socket.inet_aton(i) + socket.inet_aton('0.0.0.0'))
            s.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP,
                    socket.inet_aton(_MDNS_ADDR) + socket.inet_aton(i))
            try:

src/i/v/ivy-python-HEAD/trunk/ivy/ivy.py   ivy-python(Download)
                         socket.inet_aton(broadcast_addr),
                         socket.htonl(ifaddr))
        s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
        s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, DEFAULT_TTL)
    # /Multicast

src/h/x/hxsd-0.1.0/hxsd/__init__.py   hxsd(Download)
 
        mreq = struct.pack("=4sl", socket.inet_aton(group), socket.INADDR_ANY)
        self.sock.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, mreq)
        self.sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_TTL, 1)
        self.sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_LOOP, 1)

src/d/a/daneel-ai-HEAD/libtpproto-py/tp/netlib/discover/pyZeroconf/Zeroconf.py   daneel-ai(Download)
			pass
		self.socket.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_IF, socket.inet_aton(self.intf) + socket.inet_aton('0.0.0.0')) 
		self.socket.setsockopt(socket.SOL_IP, socket.IP_ADD_MEMBERSHIP, socket.inet_aton(_MDNS_ADDR) + socket.inet_aton('0.0.0.0'))
 
		self.listeners = []

  1 | 2 | 3 | 4  Next