|
I am still trying to get an listen app working with
synapse. I think I am going in the right direction, but I can not connect to the
app. Am I missing something?
code
========================================================
type
TServer1 = class(TThread) FSock:TTCPBlockSocket; procedure Execute; override; end; var
SysBind1, SysPort1 : String;
{*********************************************
Catch and process calls port one **********************************************} procedure TServer1.Execute; var LCmd: string; begin SysBind1 := '0.0.0.0'
SysPort1 := '4515'
FSock := TTCPBlockSocket.Create; FSock.Bind (SysBind1, SysPort1); FSock.Listen; if FSock.LastError=0 then begin while not Terminated do begin if FSock.CanRead (200) then //some client is connecting: begin //do something LCmd := Fsock.RecvString(500); Regex1 := TPerlRegEx.Create(nil); Regex1.RegEx := RegExpStr1; Regex1.Subject := LCmd; if Regex1.Match then begin Form1.richedit1.Lines.Append('system recognised'); if RegExpEnd1 = '1' then EndStr1 := 1; end else begin Form1.richedit1.Lines.Append('not recognised'); EndStr1 := 0; end; end; end; end; FSock.CloseSocket; FSock.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
