9
980
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Timer4Timer(Sender: TObject);
begin
if StatusBar1.Panels[3].Text<> '系统联机成功' then
begin
ClientSocketas.Host:=trim(E_asip.text);
ClientSocketas.Open;
end;
end;
procedure TForm1.ClientSocketasConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统联机成功';
end;
procedure TForm1.ClientSocketasConnecting(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统联机. . .';
end;
procedure TForm1.ClientSocketasDisconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统断开连接';
end;
procedure TForm1.ClientSocketasError(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
StatusBar1.Panels[3].Text := '系统联机错误';
Socket.Close;
errorcode:=0;
end;
使用ClientSocket 长时间连接不上服务器就会出现错误,该怎样解决,意思是长时间连接不上的话,(只要服务器那里打开,还能够连接上)。服务器长时间不打开的话,客户端就会“StatusBar1.Panels[3].Text := '系统联机错误'” 上面是我的全部代码,请各位详细指点
begin
if StatusBar1.Panels[3].Text<> '系统联机成功' then
begin
ClientSocketas.Host:=trim(E_asip.text);
ClientSocketas.Open;
end;
end;
procedure TForm1.ClientSocketasConnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统联机成功';
end;
procedure TForm1.ClientSocketasConnecting(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统联机. . .';
end;
procedure TForm1.ClientSocketasDisconnect(Sender: TObject;
Socket: TCustomWinSocket);
begin
StatusBar1.Panels[3].Text := '系统断开连接';
end;
procedure TForm1.ClientSocketasError(Sender: TObject;
Socket: TCustomWinSocket; ErrorEvent: TErrorEvent;
var ErrorCode: Integer);
begin
StatusBar1.Panels[3].Text := '系统联机错误';
Socket.Close;
errorcode:=0;
end;
使用ClientSocket 长时间连接不上服务器就会出现错误,该怎样解决,意思是长时间连接不上的话,(只要服务器那里打开,还能够连接上)。服务器长时间不打开的话,客户端就会“StatusBar1.Panels[3].Text := '系统联机错误'” 上面是我的全部代码,请各位详细指点