ó b@RTc@s™ddlZyddlmZmZWnEek rmeZyddlmZWqnek rieZqnXnXd„Zejddd„Z d„Z dS(i˙˙˙˙N(tpolltPOLLIN(tselectcCsÎt|dtƒ}|tkr"tS|dkr2tSts{tsBtSyt|gggdƒdSWq{tjk rwtSXntƒ}|j|t ƒx3|jdƒD]"\}}||j ƒkr¤tSq¤WdS(s  Returns True if the connection is dropped and should be closed. :param conn: :class:`httplib.HTTPConnection` object. Note: For platforms like AppEngine, this will always return ``False`` to let the platform handle connection recycling transparently for us. tsockgiN( tgetattrtFalsetNonetTrueRRtsocketterrortregisterRtfileno(tconnRtptfnotev((sV/opt/freeware/lib/python2.7/site-packages/requests/packages/urllib3/util/connection.pytis_connection_dropped s"    cCs|\}}d}xâtj||dtjƒD]Ĺ}|\}} } } } d} yltj|| | ƒ} t| |ƒ|tjk r“| j|ƒn|rŠ| j|ƒn| j| ƒ| SWq.tj k rň}|}| dk ró| j ƒqóq.Xq.W|dk r |‚ntj dƒ‚dS(sdConnect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. is!getaddrinfo returns an empty listN( RRt getaddrinfot SOCK_STREAMt_set_socket_optionst_GLOBAL_DEFAULT_TIMEOUTt settimeouttbindtconnectR tclose(taddressttimeouttsource_addresstsocket_optionsthosttportterrtrestaftsocktypetprotot canonnametsaRt_((sV/opt/freeware/lib/python2.7/site-packages/requests/packages/urllib3/util/connection.pytcreate_connection0s* "     cCs2|dkrdSx|D]}|j|ŒqWdS(N(Rt setsockopt(Rtoptionstopt((sV/opt/freeware/lib/python2.7/site-packages/requests/packages/urllib3/util/connection.pyR\s  ( RRRRt ImportErrorRRRRR'R(((sV/opt/freeware/lib/python2.7/site-packages/requests/packages/urllib3/util/connection.pyts    $+