658 B
658 B
id | title | challengeType | videoId | bilibiliIds | dashedName | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
5ea9997bbec2e9bc47e94db4 | 開發一個端口掃描器 | 11 | z_qkqZS7KZ4 |
|
developing-a-port-scanner |
--question--
--text--
.connect()
和 .connect_ex()
方法的主要區別是什麼?
--answers--
這兩種方法之間沒有區別。
如果有錯誤或沒有找到主機,.connect()
返回一個錯誤代碼,而 .connect_ex()
則引發一個異常。
如果有錯誤或沒有找到主機,.connect()
會引發一個異常,而 .connect_ex()
會返回一個錯誤代碼。
--video-solution--
3