import socket
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk.settimeout(1)
try:
sk.connect(('www.outofmemory.cn',80))
print 'Server port 80 OK!'
except Exception:
print 'Server port 80 not connect!'
sk.close()

arrow
arrow
    全站熱搜

    戮克 發表在 痞客邦 留言(0) 人氣()