# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT # OVERRIDES FILE: static-pi-files/2.6/_socketoverride.py """ Implementation module for socket operations. See the socket module for documentation. """ AF_APPLETALK = 16 AF_DECnet = 12 AF_INET = 2 AF_INET6 = 30 AF_IPX = 23 AF_ROUTE = 17 AF_SNA = 11 AF_UNIX = 1 AF_UNSPEC = 0 AI_ADDRCONFIG = 1024 AI_ALL = 256 AI_CANONNAME = 2 AI_DEFAULT = 1536 AI_MASK = 5127 AI_NUMERICHOST = 4 AI_NUMERICSERV = 4096 AI_PASSIVE = 1 AI_V4MAPPED = 2048 AI_V4MAPPED_CFG = 512 CAPI = None EAI_ADDRFAMILY = 1 EAI_AGAIN = 2 EAI_BADFLAGS = 3 EAI_BADHINTS = 12 EAI_FAIL = 4 EAI_FAMILY = 5 EAI_MAX = 15 EAI_MEMORY = 6 EAI_NODATA = 7 EAI_NONAME = 8 EAI_OVERFLOW = 14 EAI_PROTOCOL = 13 EAI_SERVICE = 9 EAI_SOCKTYPE = 10 EAI_SYSTEM = 11 INADDR_ALLHOSTS_GROUP = 3758096385 INADDR_ANY = 0 INADDR_BROADCAST = 4294967295 INADDR_LOOPBACK = 2130706433 INADDR_MAX_LOCAL_GROUP = 3758096639 INADDR_NONE = 4294967295 INADDR_UNSPEC_GROUP = 3758096384 IPPORT_RESERVED = 1024 IPPORT_USERRESERVED = 5000 IPPROTO_AH = 51 IPPROTO_DSTOPTS = 60 IPPROTO_EGP = 8 IPPROTO_EON = 80 IPPROTO_ESP = 50 IPPROTO_FRAGMENT = 44 IPPROTO_GGP = 3 IPPROTO_GRE = 47 IPPROTO_HELLO = 63 IPPROTO_HOPOPTS = 0 IPPROTO_ICMP = 1 IPPROTO_ICMPV6 = 58 IPPROTO_IDP = 22 IPPROTO_IGMP = 2 IPPROTO_IP = 0 IPPROTO_IPCOMP = 108 IPPROTO_IPIP = 4 IPPROTO_IPV4 = 4 IPPROTO_IPV6 = 41 IPPROTO_MAX = 256 IPPROTO_ND = 77 IPPROTO_NONE = 59 IPPROTO_PIM = 103 IPPROTO_PUP = 12 IPPROTO_RAW = 255 IPPROTO_ROUTING = 43 IPPROTO_RSVP = 46 IPPROTO_TCP = 6 IPPROTO_TP = 29 IPPROTO_UDP = 17 IPPROTO_XTP = 36 IPV6_CHECKSUM = 26 IPV6_DSTOPTS = 23 IPV6_HOPLIMIT = 20 IPV6_HOPOPTS = 22 IPV6_JOIN_GROUP = 12 IPV6_LEAVE_GROUP = 13 IPV6_MULTICAST_HOPS = 10 IPV6_MULTICAST_IF = 9 IPV6_MULTICAST_LOOP = 11 IPV6_NEXTHOP = 21 IPV6_PKTINFO = 19 IPV6_RECVTCLASS = 35 IPV6_RTHDR = 24 IPV6_RTHDR_TYPE_0 = 0 IPV6_TCLASS = 36 IPV6_UNICAST_HOPS = 4 IPV6_V6ONLY = 27 IP_ADD_MEMBERSHIP = 12 IP_DEFAULT_MULTICAST_LOOP = 1 IP_DEFAULT_MULTICAST_TTL = 1 IP_DROP_MEMBERSHIP = 13 IP_HDRINCL = 2 IP_MAX_MEMBERSHIPS = 20 IP_MULTICAST_IF = 9 IP_MULTICAST_LOOP = 11 IP_MULTICAST_TTL = 10 IP_OPTIONS = 1 IP_RECVDSTADDR = 7 IP_RECVOPTS = 5 IP_RECVRETOPTS = 6 IP_RETOPTS = 8 IP_TOS = 3 IP_TTL = 4 MSG_CTRUNC = 32 MSG_DONTROUTE = 4 MSG_DONTWAIT = 128 MSG_EOR = 8 MSG_OOB = 1 MSG_PEEK = 2 MSG_TRUNC = 16 MSG_WAITALL = 64 NI_DGRAM = 16 NI_MAXHOST = 1025 NI_MAXSERV = 32 NI_NAMEREQD = 4 NI_NOFQDN = 1 NI_NUMERICHOST = 2 NI_NUMERICSERV = 8 SHUT_RD = 0 SHUT_RDWR = 2 SHUT_WR = 1 SOCK_DGRAM = 2 SOCK_RAW = 3 SOCK_RDM = 4 SOCK_SEQPACKET = 5 SOCK_STREAM = 1 SOL_IP = 0 SOL_SOCKET = 65535 SOL_TCP = 6 SOL_UDP = 17 SOMAXCONN = 128 SO_ACCEPTCONN = 2 SO_BROADCAST = 32 SO_DEBUG = 1 SO_DONTROUTE = 16 SO_ERROR = 4103 SO_KEEPALIVE = 8 SO_LINGER = 128 SO_OOBINLINE = 256 SO_RCVBUF = 4098 SO_RCVLOWAT = 4100 SO_RCVTIMEO = 4102 SO_REUSEADDR = 4 SO_REUSEPORT = 512 SO_SNDBUF = 4097 SO_SNDLOWAT = 4099 SO_SNDTIMEO = 4101 SO_TYPE = 4104 SO_USELOOPBACK = 64 SocketType = socket TCP_MAXSEG = 2 TCP_NODELAY = 1 class error(IOError): pass def fromfd(fd, family, type, proto=None): """ fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket(). """ return SocketType() class gaierror(error): pass def getaddrinfo(host, port, family=None, socktype=None, proto=None, flags=None): """ getaddrinfo(host, port [, family, socktype, proto, flags]) -> list of (family, socktype, proto, canonname, sockaddr) Resolve host and port into addrinfo struct. """ pass def getdefaulttimeout(): """ getdefaulttimeout() -> timeout Returns the default timeout in floating seconds for new socket objects. A value of None indicates that new socket objects have no timeout. When the socket module is first imported, the default is None. """ return None def gethostbyaddr(host): """ gethostbyaddr(host) -> (name, aliaslist, addresslist) Return the true host name, a list of aliases, and a list of IP addresses, for a host. The host argument is a string giving a host name or IP number. """ return (None, [], []) def gethostbyname(host): """ gethostbyname(host) -> address Return the IP address (a string of the form '255.255.255.255') for a host. """ return None def gethostbyname_ex(host): """ gethostbyname_ex(host) -> (name, aliaslist, addresslist) Return the true host name, a list of aliases, and a list of IP addresses, for a host. The host argument is a string giving a host name or IP number. """ return (None, [], []) def gethostname(): """ gethostname() -> string Return the current host name. """ return "" def getnameinfo(sockaddr, flags): """ getnameinfo(sockaddr, flags) --> (host, port) Get host and port for a sockaddr. """ return (None, None) def getprotobyname(name): """ getprotobyname(name) -> integer Return the protocol number for the named protocol. (Rarely used.) """ return 1 def getservbyname(servicename, protocolname=None): """ getservbyname(servicename[, protocolname]) -> integer Return a port number from a service name and protocol name. The optional protocol name, if given, should be 'tcp' or 'udp', otherwise any protocol will match. """ return 1 def getservbyport(port, protocolname=None): """ getservbyport(port[, protocolname]) -> string Return the service name from a port number and protocol name. The optional protocol name, if given, should be 'tcp' or 'udp', otherwise any protocol will match. """ return "" has_ipv6 = True class herror(error): pass def htonl(integer): """ htonl(integer) -> integer Convert a 32-bit integer from host to network byte order. """ return 1 def htons(integer): """ htons(integer) -> integer Convert a 16-bit integer from host to network byte order. """ return 1 def inet_aton(string): """ inet_aton(string) -> packed 32-bit IP representation Convert an IP address in string format (123.45.67.89) to the 32-bit packed binary format used in low-level network functions. """ return None def inet_ntoa(packed_ip): """ inet_ntoa(packed_ip) -> ip_address_string Convert an IP address from 32-bit packed binary format to string format """ return "" def inet_ntop(af, packed_ip): """ inet_ntop(af, packed_ip) -> string formatted IP address Convert a packed IP address of the given family to string format. """ return "" def inet_pton(af, ip): """ inet_pton(af, ip) -> packed IP address string Convert an IP address from string format to a packed string suitable for use with low-level network functions. """ return "" def ntohl(integer): """ ntohl(integer) -> integer Convert a 32-bit integer from network to host byte order. """ return 1 def ntohs(integer): """ ntohs(integer) -> integer Convert a 16-bit integer from network to host byte order. """ return 1 def setdefaulttimeout(timeout): """ setdefaulttimeout(timeout) Set the default timeout in floating seconds for new socket objects. A value of None indicates that new socket objects have no timeout. When the socket module is first imported, the default is None. """ pass def socketpair(family=None, type=None, proto=None): """ socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise, the default is AF_INET. """ return (SocketType(), SocketType()) class timeout(error): pass # BEGIN MANUAL OVERRIDES FROM static-pi-files/2.6/_socketoverride.py __builtins__ = {} __doc__ = None __file__ = '/Users/Shared/src/ide/build-files/static-pi-files/2.6/_socketoverride.py' __name__ = '_socketoverride' __package__ = None def socket(family, type, proto=None): """ socket(family, type[, proto]) -> socket object Open a socket of the given type. The family argument specifies the address family; it is normally AF_INET, sometimes AF_UNIX. The type argument specifies whether this is a stream (SOCK_STREAM) or datagram (SOCK_DGRAM) socket. The protocol argument defaults to 0, specifying the default protocol. """ return SocketType() # END MANUAL OVERRIDES