Hi I need to ask for some help with my App. While it works OK on windows I 
need to get it to work with linux. I think I need to implement synchronize 
so that I can parse to data to other procedures. But I am having some 
difficulty implementing synchronize in my code. Can you help point me in the 
right direction?
A snippet of code follows. FreePascal 2.0.4
=======================
uses
  cthreads,
 Classes, SysUtils,passqlite,BlckSock, synsock, dataparse;

var
  Sock:TTCPBlockSocket;
  ClientSock:TSocket;

type
  TTCPEchoThrd = class(TThread)
  private
    Sock:TTCPBlockSocket;
    CSock: TSocket;
    procedure DataParse;
    S:String;
  public
    Constructor Create (hsock:tSocket);
    procedure Execute; override;
  end;
// Some thread stuff
.........
.......
.........

procedure TTCPEchoThrd.Execute;
begin
  sock:=TTCPBlockSocket.create;
  try
    Sock.socket:=CSock;
    sock.GetSins;
    with sock do
      begin
        repeat
          if terminated then break;
          S := RecvString(strToInt(dtimeout1));
          if lastError<>0 then break;
          SendString(S+#13);
//          WriteLn(S); not used
            synchronize(@dataparse);
            resume;
          if lastError<>0 then break;
        until false;
      end;
  finally
    Sock.Free;
  end;
end;


procedure TTCPEchoThrd.DataParse;
begin
WriteLn(S);
 end;
========================

When I run this code any data stops be processed at synchronize 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to