B
baohongyu
Unregistered / Unconfirmed
GUEST, unregistred user!
出错提示:Error reading from socket.
程序如下:
主表单如下定义,MainForm:
SocketConnection:TSocketConnection;
procedure connection;
begin
SocketConnection.Connectioned:=true;
end;
线程如下定义,RunThread:
unit RunTestUnit;
interface
uses
Classes,Windows,SysUtils,WinSock;
type
RunTest = class(TThread)
private
{ Private declarations }
public
procedure Go(Commandstr:string);
protected
procedure Execute;
override;
end;
implementation
uses
MainUnit;//主表单
{ RunTest }
procedure RunTest.Execute;
begin
while truedo
begin
if Terminated then
exit;
if not suspended then
begin
if not MainFrom.Socketconnection.connectioned then
MainFrom.Socketconnection.connectioned:=true;
end;
end;
end;
然后在主表单的一个按钮事件里,将挂起标志置False.
提示错误:Error reading from socket.
请问大虾,以上问题,如何解决~~
程序如下:
主表单如下定义,MainForm:
SocketConnection:TSocketConnection;
procedure connection;
begin
SocketConnection.Connectioned:=true;
end;
线程如下定义,RunThread:
unit RunTestUnit;
interface
uses
Classes,Windows,SysUtils,WinSock;
type
RunTest = class(TThread)
private
{ Private declarations }
public
procedure Go(Commandstr:string);
protected
procedure Execute;
override;
end;
implementation
uses
MainUnit;//主表单
{ RunTest }
procedure RunTest.Execute;
begin
while truedo
begin
if Terminated then
exit;
if not suspended then
begin
if not MainFrom.Socketconnection.connectioned then
MainFrom.Socketconnection.connectioned:=true;
end;
end;
end;
然后在主表单的一个按钮事件里,将挂起标志置False.
提示错误:Error reading from socket.
请问大虾,以上问题,如何解决~~