線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1676
推到 Plurk!
推到 Facebook!

當測試兩台電腦的網路傳輸資料時,如果將其中一台網路線拔掉,ClientSocket如何判斷已經斷線,

尚未結案
ORISBOY
一般會員


發表:11
回覆:7
積分:3
註冊:2004-10-25

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-03-25 11:39:57 IP:211.72.xxx.xxx 未訂閱
如題,如果兩台pc透過ClientSocket互傳資料時,我將接收的程式寫在onRead中,資料接收時一直都很順利,但是如果將網路線拔掉,我要如何去判斷已經斷線。 我是ORIS,大家好
------
我是ORIS,大家好
huwk
資深會員


發表:26
回覆:340
積分:323
註冊:2002-04-03

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-03-30 20:01:05 IP:211.76.xxx.xxx 未訂閱
他有evem 1.OnDisconnect Occurs just before a client socket closes the connection to a server socket. property OnDisconnect: TSocketNotifyEvent; Description Write an OnDisconnect event handler to take specific action when the connection to a server socket is about to be terminated. OnDisconnect occurs after the value of the Active property is set to False, but before the actual connection is closed. 2.OnError Occurs when the socket fails in making, using, or shutting down a connection. property OnError: TSocketErrorEvent; Description Write an OnError event handler to respond to errors that arise with the socket connection. Set the ErrorCode parameter to 0 if the OnError event handler successfully deals with the error condition, to prevent an ESocketError from being raised.
------
熊的學習 http://huwk.blogspot.com
Ktop_Robot
站務副站長


發表:0
回覆:3511
積分:0
註冊:2007-04-17

發送簡訊給我
#3 引用回覆 回覆 發表時間:2007-04-18 17:33:10 IP:000.000.xxx.xxx 未訂閱
提問者您好:


以上回應是否已得到滿意的答覆?


若已得到滿意的答覆,請在一週內結案,否則請在一週內回覆還有什麼未盡事宜,不然,
將由版主(尚無版主之區域將由副站長或站長)自由心證,選擇較合適之解答予以結案處理,
被選上之答題者同樣會有加分獎勵同時發問者將受到扣 1 分的處分。不便之處,請見諒。


有問有答有結案,才能有良性的互動,良好的討論環境需要大家共同維護,感謝您的配合。

------
我是機器人,我不接受簡訊.
系統時間:2024-04-26 3:17:31
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!