Lloyd Thomas schrieb:
> I thought this was the loop.
> repeat
> if terminated then break;
> if canread(1000) then
> begin
> ClientSock:=accept;
> if lastError=0 then TTCPEchoThrd.create(ClientSock);
> writeln('Listening'); //error here not listening
> end;
> until false;
Yes, would be, but it's overkill to put this in a extra thread.
If you do this, your app is exiting after creating the listener thread.
You can totally omit the TTCPEchoDaemon thread class in case of console
app imho.
I'd keep it simple:
-------------------
program blah...
uses blah....
var
Sock:TTCPBlockSocket;
ClientSock:TSocket;
begin //program
Sock:=TTCPBlockSocket.create;
with sock do
begin
.....etc.etc.etc
end;
Sock.free;
end.
..................................
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public