Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

pythonÈçºÎÉèÖÃCLOSE_WAIT״̬ռÓõĶ˿ÚÖØÓÃ

·¢ÏÖpython2.6
import httplib
conn=httplib.HTTPSConnection('x.x.x.x')
conn.request('','')
rd=conn.getresponse()
conn.close()
ÕâÑù½áÊøºó»á±ä³ÉCLOSE_WAIT״̬£¬ÎÒµÄÊÇ·þÎñ¶ËÖ÷¶¯¶Ï¿ªÁ¬½ÓµÄ£¬·¢ÏÖ¿Í»§¶ËÔÚconn.close()µÄʱºò²»»á·¢fin°ü£¬
ÎÒÔÚÍøÉÏËѹýһЩ½â¾ö°ì·¨£¬¸Ð¾õÕâ¸ö±È½ÏºÃ¾ÍÊǽ«CLOSE_WAIT״̬µÄ¶Ë¿ÚÔÙ·¢ÆðÐÂÁ´½ÓµÄʱºò»¹Ê¹ÓÃÕâ¸ö±»
CLOSE_WAITÕ¼ÓõĶ˿ڣ¬µ«ÊDz»Ì«Á˽âÈçºÎÉèÖÃpythonÔÚ·¢ÏÖij¸ö¶Ë¿ÚÊÇCLOSE_WAITµÄʱºò£¬²»×öеÄÁ¬½Ó£¬»¹Ê¹ÓÃÕâ¸ö¶Ë¿ÚÀ´Á¬½ÓÄÄ£¿£¿£¿Ð»Ð»¡£

Èç¹ûÓкð취½â¾öCLOSE_WAIT״̬µÄ»°Ò²Ï£ÍûÖ¸µãÖ¸µã£¡~~

{{


Ïà¹ØÎÊ´ð£º

pythonÖÐÏß³ÌÎÊÌ⣿£¿

ÎÒÏÖÔÚÊÇÕâÑùµÄ
¿ªÁËÒ»¸ö×ÓỊ̈߳¬¶ÁÈ¡ÏÂÃæµÄÏûÏ¢
±¾ÒâÊÇ
Python code:

while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass

¼ÙÈ ......

pythonµÄÒýÓüÆÊý

ÎÒÓÃÁËdef CreateMyDialog(self):
        dlg = MyDialog(None, -1, ''.decode('utf8'), (300,300), (300,200), wx.DEFAULT_DIALOG_STYLE | wx.DIALOG_NO_PARENT )
&nbs ......

ÓÃPythonʵÏÖÒ»¸ö¼òµ¥µÄͨѶ¼

¸÷λ¸ßÊÖ£¬ÄÄλÄÜд¸ö¼òµ¥µÄͨѶ¼£¬Ö»±£´æÐÕÃûºÍÊÖ»úºÅ£¬Äܱ£´æµ½Ó²Å̲¢¿É¶Á»Ø£¬ÓÐÌí¼Ó£¬É¾³ý£¬Ð޸ģ¬²éѯ¹¦ÄÜ£¬ÃüÁîÐÐʽµÄ¾ÍÐÐ
ÕâÖÖ»îÄãµÃ×Ô¼º¸É£¬ÓÐÎÊÌâ¿ÉÒÔÎÊ£¬µ«²»»áÓÐÈË°ïÄã×öµÄ¡£

¸øÄãÔ´Âë
http://dow ......

PythonÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯

±¾ÎÄÕª×Ô¡¶¿É°®µÄPython¡·¡°¹âÅ̹ÊÊ¡±CDay-1 ʵÓû¯ÖÐÎÄ¡£
[img]http://t.douban.com/mpic/s3901817.jpg[/img]
CDay-1 ʵÓû¯ÖÐÎÄÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯
ÄãÅöµ½99%µÄÎÊÌ⣬ÆäËûÈË֮ǰÒѾ­Óöµ½¹ýÁË£¬Ë ......

[ÌáÎÊ]Python ÈçºÎºöÂÔ whitespace ¶ÁÈë

Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:

>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ