W WYHTH Unregistered / Unconfirmed GUEST, unregistred user! 2001-02-06 #1 用WINSOCK写的程序,S端处于监听状态。当某一C端非正常退出后(如当机), 再次连接时连接速度非常慢!是何原因?如何解决?请各位大虾帮帮忙!小第不甚感激!
房 房客 Unregistered / Unconfirmed GUEST, unregistred user! 2001-02-07 #2 充分利用Winsock的多线程特性能解决 每当Client DAWN就触发OnError procedure onConnectionError(Sender:TObject;Socket:TCustomWinSocket; ErrorEvent:TErrorEvent;var errorCode:integer); TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept); 然后procedure TForm1.ServerSocket1Accept中socket.onErrorEvent := onConnectionError;
充分利用Winsock的多线程特性能解决 每当Client DAWN就触发OnError procedure onConnectionError(Sender:TObject;Socket:TCustomWinSocket; ErrorEvent:TErrorEvent;var errorCode:integer); TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept); 然后procedure TForm1.ServerSocket1Accept中socket.onErrorEvent := onConnectionError;
W WYHTH Unregistered / Unconfirmed GUEST, unregistred user! 2001-02-11 #3 小弟已自己解决了!不过还是要谢谢“房客”!给你100分