Somewhere in your main tread you would declare a variable of type TTCPEchoDaemon.
i.e:
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
server : TTCPEchoDaemon;
{ Private declarations }
public
{ Public declarations }
end;
and in the instatiation you would do :
Server := TTCPEchoDaemon.create;
and to kill it you do
server.Terminate;
Now this is all very basic delphi stuff, if you have problems understanging any of this I strongly suggest you take a step back and learn some basic delphi programming techniques first.
Mikael
On 10/23/06, Lloyd Thomas <[EMAIL PROTECTED]> wrote:
OK, I wish to kill the listening thread, but How? My delphi skills are not the best. So based on the 'echo example' How would I kill the listen thread.I thought something like the following my do the trick:=========================================procedure TForm1.Endconnection(Sender: TObject);
begin
Tserver1.destroy;
end;=========================================But I get the follwoing error.[Pascal Error] unit1.pas(894): E2076 This form of method call only allowed for class methodsLloyd----- Original Message -----From: Mikael OstenssonTo: Ararat SynapseSent: Monday, October 23, 2006 3:24 PMSubject: Re: [Synalist] Closing socketI'm not sure which socket you want to kill:
If it's the listening socket, kill the listening tread.
If its the connetion socket, add your connection treads to a list when you spawn them, so that you can get a reference to the threads object and kill the appropriate thread.
Mikael
On 10/22/06, Lloyd Thomas <[EMAIL PROTECTED]> wrote:So I have managed to get my app working using the 'echo' demo as a base. But I need to find a way to close the socket/connection with a procedure in the main thread. Any Ideas?Lloyd
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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
-------------------------------------------------------------------------
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
------------------------------------------------------------------------- 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
