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 code:
while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass
¼ÙÈ ......
ÎÒÓÃÁËdef CreateMyDialog(self):
dlg = MyDialog(None, -1, ''.decode('utf8'), (300,300), (300,200), wx.DEFAULT_DIALOG_STYLE | wx.DIALOG_NO_PARENT )
&nbs ......
¸÷λ¸ßÊÖ£¬ÄÄλÄÜд¸ö¼òµ¥µÄͨѶ¼£¬Ö»±£´æÐÕÃûºÍÊÖ»úºÅ£¬Äܱ£´æµ½Ó²Å̲¢¿É¶Á»Ø£¬ÓÐÌí¼Ó£¬É¾³ý£¬Ð޸ģ¬²éѯ¹¦ÄÜ£¬ÃüÁîÐÐʽµÄ¾ÍÐÐ
ÕâÖÖ»îÄãµÃ×Ô¼º¸É£¬ÓÐÎÊÌâ¿ÉÒÔÎÊ£¬µ«²»»áÓÐÈË°ïÄã×öµÄ¡£
¸øÄãÔ´Âë
http://dow ......
±¾ÎÄÕª×Ô¡¶¿É°®µÄPython¡·¡°¹âÅ̹ÊÊ¡±CDay-1 ʵÓû¯ÖÐÎÄ¡£
[img]http://t.douban.com/mpic/s3901817.jpg[/img]
CDay-1 ʵÓû¯ÖÐÎÄÖÐÎÄ´¦Àí£¬Íê³É¹¦ÄܵÄʵÓû¯
ÄãÅöµ½99%µÄÎÊÌ⣬ÆäËûÈË֮ǰÒѾÓöµ½¹ýÁË£¬Ë ......
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......