Hi all,
I would like to make simple RS232 server (for gsm modem) that is working in a
Thread. But i don't know - is this way , like this under, good ???
type
TMkGSMThread = class(TThread)
private
FTSerial : TBlockSerial;
end;
// on create thread i'm creating FTSerial, on destroy - freeing
TMkThread.Execute
begin
while not Terminated or not Application.Terminated do begin
// if Parent want to connect to GSM modem
if not FTSerial connected then
FTSerial.Connecting.... on demand
// receiving some data from modem
if FTSerial connected then
FTSerial.Receive ..... something
// sending AT commands etc
if FTSerial connected then
FTSerial.Send....something
Sleep(10);
end;
end;
generally it's working for me, but sometimes have i situations when (i think) I
lost some data from modem
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public