-
<c       s    d  Z  ' ) d k T+ d k Z d k Z - d g Z . d k Z / e i e i e   1 e i i   i	 d  p4 e
 e d  o e i   d d j p e i d j o` 5 e i Z 7 d d	  Z : y ; e i Z Wn < e j
 o
 = n X? e e d
  Z n F e i i   i	 d  o G h  Z H d e d <I d e d <J d e d <K d e d <L d e d <M d e d <N d e d <O d e d <P d e d <Q d e d <R d e d  <S d! e d" <T d# e d$ <U d% e d& <V d' e d( <W e i d)  n X [ [ [ d* d+  Z } d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d: d; f Z  d< f  d=     YZ  d> f  d?     YZ d S(@   s  This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.

Functions:

socket() -- create a new socket object
fromfd() -- create a socket object from an open file descriptor [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- mape a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
ssl() -- secure socket layer support (only available if configured)

 [*] not available on all platforms!

Special objects:

SocketType -- type object for socket objects
error -- exception raised for I/O errors

Integer constants:

AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)

Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
(   s   *Ns   getfqdns   wins   unamei    s   BeOSs   riscosc    s    7 8 t  t |  | |   Sd  S(   N(   s   _socketobjects   _realsocketcalls   familys   types   proto(   s   familys   types   proto(    (    s   /usr/lib/python2.2/socket.pys   socket7 s   c    s=   ? @ t  |  d  o A |  i }  n B t |  | |  Sd  S(   Ns   _sock(   s   hasattrs   socks   _socks   _realsslcalls   keyfiles   certfile(   s   socks   keyfiles   certfile(    (    s   /usr/lib/python2.2/socket.pys   ssl? s   s   The operation was interrupted.i'  s   A bad file handle was passed.i'  s   Permission denied.i'  s!   A fault occurred on the network??i'  s#   An invalid operation was attempted.i&'  s    The socket operation would blocki3'  s,   A blocking operation is already in progress.i4'  s   The network address is in use.i@'  s   The connection has been reset.iF'  s   The network has been shut down.iJ'  s   The operation timed out.iL'  s   Connection refused.iM'  s   The name is too long.iO'  s   The host is down.iP'  s   The host is unreachable.iQ'  s   errorTabs    c    s   [ c d |  i   }  e |  p
 |  d j o f t   }  n g y h t |   \ } } } Wn i t j
 o
 j nM Xl | i d |  m x2 | Dm ] }  n d |  j o o Pn q Wq | }  r |  Sd S(   s  Get fully qualified domain name from name.

    An empty argument is interpreted as meaning the local host.

    First the hostname returned by gethostbyaddr() is checked, then
    possibly existing aliases. In case no FQDN is available, hostname
    is returned.
    s   0.0.0.0i    s   .N(	   s   names   strips   gethostnames   gethostbyaddrs   hostnames   aliasess   ipaddrss   errors   insert(   s   names   ipaddrss   hostnames   aliases(    (    s   /usr/lib/python2.2/socket.pys   getfqdn[ s   
 		s   binds   connects
   connect_exs   filenos   listens   getpeernames   getsocknames
   getsockopts
   setsockopts   recvs   recvfroms   sends   sendalls   sendtos   setblockings   shutdowns   _socketobjectc      s    t  Z  d f  d     YZ  d   Z  d   Z  d   Z  d   Z  d   Z  d d	 d
  Z  d Z	  x& e
 D ] Z  e	 e e f d  Uq WRS(   Ns   _closedsocketc      s    t  Z  d   Z RS(   Nc    s     t  d d   d  S(   Ni	   s   Bad file descriptor(   s   error(   s   selfs   name(    (    s   /usr/lib/python2.2/socket.pys   __getattr__ s   (   s   __name__s
   __module__s   __getattr__(    (    (    s   /usr/lib/python2.2/socket.pys   _closedsocket s   	c    s     | |  _ d  S(   N(   s   socks   selfs   _sock(   s   selfs   sock(    (    s   /usr/lib/python2.2/socket.pys   __init__ s   c    s     |  i i   |  _ d  S(   N(   s   selfs	   __class__s   _closedsockets   _sock(   s   self(    (    s   /usr/lib/python2.2/socket.pys   close s   c    s     |  i   d  S(   N(   s   selfs   close(   s   self(    (    s   /usr/lib/python2.2/socket.pys   __del__ s   c    s2     |  i i   \ } }  t |  | f Sd  S(   N(   s   selfs   _socks   accepts   socks   addrs   _socketobject(   s   selfs   socks   addr(    (    s   /usr/lib/python2.2/socket.pys   accept s   c    s     t  |  i  Sd  S(   N(   s   _socketobjects   selfs   _sock(   s   self(    (    s   /usr/lib/python2.2/socket.pys   dup s   s   ric    s     t  |  i | |  Sd  S(   N(   s   _fileobjects   selfs   _socks   modes   bufsize(   s   selfs   modes   bufsize(    (    s   /usr/lib/python2.2/socket.pys   makefile s   s2   def %s(self, *args): return self._sock.%s(*args)

(   s   __name__s
   __module__s   _closedsockets   __init__s   closes   __del__s   accepts   dups   makefiles   _ss   _socketmethodss   _m(    (    (    s   /usr/lib/python2.2/socket.pys   _socketobject s   		
 	s   _fileobjectc      s    t  Z  d   Z  d   Z  d   Z  d   Z  d   Z  d   Z  d   Z  d d	  Z	  d d
  Z
  d d  Z RS(   Nc    sp     | |  _  | |  _  | d j  o  d } n  t d |  |  _  | |  _  d |  _	 |  _
 d  S(   Ni    i   i   s    (   s   socks   selfs   _socks   modes   _modes   bufsizes   maxs	   _rbufsizes	   _wbufsizes   _wbufs   _rbuf(   s   selfs   socks   modes   bufsize(    (    s   /usr/lib/python2.2/socket.pys   __init__ s   c    s?     z"  |  i o  |  i   n Wd    d |  _ Xd  S(   Ni    (   s   selfs   _socks   flush(   s   self(    (    s   /usr/lib/python2.2/socket.pys   close s
   c    s     |  i   d  S(   N(   s   selfs   close(   s   self(    (    s   /usr/lib/python2.2/socket.pys   __del__ s   c    s:     |  i o&  |  i i |  i   d |  _ n d  S(   Ns    (   s   selfs   _wbufs   _socks   sendall(   s   self(    (    s   /usr/lib/python2.2/socket.pys   flush s   c    s     |  i i   Sd  S(   N(   s   selfs   _socks   fileno(   s   self(    (    s   /usr/lib/python2.2/socket.pys   fileno s   c    s     |  i | |  _  |  i d j o%  d | j o  |  i   n n.  t |  i  |  i j o  |  i   n d  S(   Ni   s   
(   s   selfs   _wbufs   datas	   _wbufsizes   flushs   len(   s   selfs   data(    (    s   /usr/lib/python2.2/socket.pys   write s   c    s*     t  |  i i |   |  i   d  S(   N(   s   filters   selfs   _socks   sendalls   lists   flush(   s   selfs   list(    (    s   /usr/lib/python2.2/socket.pys
   writelines s   ic    s    | d j oC t |  i  }  | | j o.  |  i |  }  |  i | |  _  | Sn  | | }  |  i g }  d |  _  x  | d j o  |  i i t	 | |  i
   }  | o  Pn  t |  }  | | j o,  | i | |    | | |  _  Pn  | i |   | | } q W d i |  Sn  t	 d |  i
  }  |  i g }  d |  _  xa  d oV  |  i i |  }  | o  Pn  | i |   t | d d d  } qW d i |  Sd  S(   Ni    s    i   i   i   i   (   s   ns   lens   selfs   _rbufs   ks   datas   Ls   _socks   recvs   maxs	   _rbufsizes   news   appends   joins   min(   s   selfs   ns   news   ks   datas   L(    (    s   /usr/lib/python2.2/socket.pys   read sB    !  
 c    sy    d }  |  i i d  }  x  | d j  o% d | j  o t |  i  j n o~  |  i i |  i	  }  | o  Pn  | i d  }  | d j o  | t |  i  } n  |  i | |  _ q' W | d j  o  t |  i  } n  | d }  d | j o t |  i  j  n o  | } n  |  i |  |  i | f \ } |  _  | Sd  S(   Ns    s   
i    i   (   s   datas   selfs   _rbufs   finds   is   limits   lens   _socks   recvs	   _rbufsizes   new(   s   selfs   limits   is   news   data(    (    s   /usr/lib/python2.2/socket.pys   readline s$   	 8   * &i    c    s     d }  g  }  xs  d oh  |  i   }  | o  Pn  | i |   | t |  7} | o
 | | j o Pn q W| Sd  S(   Ni    i   (   s   totals   lists   selfs   readlines   lines   appends   lens   sizehint(   s   selfs   sizehints   totals   lists   line(    (    s   /usr/lib/python2.2/socket.pys	   readlines s   		 
 (   s   __name__s
   __module__s   __init__s   closes   __del__s   flushs   filenos   writes
   writeliness   reads   readlines	   readlines(    (    (    s   /usr/lib/python2.2/socket.pys   _fileobject s   			(   s   __doc__s   _sockets   oss   syss   __all__s   extends   _get_exports_lists   platforms   lowers
   startswiths   hasattrs   unames   sockets   _realsocketcalls   ssls   _realsslcalls   AttributeErrors   Nones   errorTabs   appends   getfqdns   _socketmethodss   _socketobjects   _fileobject(   s   _socketmethodss   _realsocketcalls   sockets   __all__s   _realsslcalls   oss   _sockets   _socketobjects   syss   ssls   getfqdns   _fileobjects   errorTab(    (    s   /usr/lib/python2.2/socket.pys   ?' sH   
S		"9