如何取得 local port 是否被佔用. |
答題得分者是:disabledman
|
cwchiang
一般會員 發表:27 回覆:11 積分:7 註冊:2003-06-09 發送簡訊給我 |
|
disabledman
一般會員 發表:0 回覆:5 積分:6 註冊:2004-02-13 發送簡訊給我 |
|
sya
一般會員 發表:2 回覆:2 積分:0 註冊:2004-04-19 發送簡訊給我 |
這是我在help上看到的, 可以參考看看 procedure Bind; Description Bind is used on an unconnected socket to associate the IP and Port of the local host with Handle prior to Connect or Listen operations. If the application does not care what address is assigned to it, it may use a blank IP (''). This allows the protocol stack to assign the Internet address Id_INADDR_ANY, and an any appropriate network interface will be used. If the application does not care what port is assigned to it, it may use Port 0. This allows the protocol stack to assign a unique port to the application with a value between 1024 and 5000. Use SetSockOpt to alter socket-level settings including broadcast, linger, buffering, and Nagle options. Bind will raise an EIdException if the address in IP and Port is already in use.
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |