Hello, thank you for your answers,
I'm using these parameters:
        ((TTcpSrvClient *)Client)->LineMode        = FALSE;// 
        ((TTcpSrvClient *)Client)->LineEdit        = TRUE;
        ((TTcpSrvClient *)Client)->OnDataAvailable = ClientDataAvailable;
        ((TTcpSrvClient *)Client)->OnBgException   = ClientBgException;
        ((TTcpSrvClient *)Client)->ConnectTime     = Now();

And I'm using this class for the client:
class TTcpSrvClient : public TWSocketClient
{
public:
        AnsiString RcvdLine;
        TDateTime  ConnectTime;
        char *tmp;
        __fastcall TTcpSrvClient(TComponent* Owner);
        /*ai que me dói*/
        void __fastcall ProcessaMsgClient(TForm2 *AForm);
        void __fastcall ProcessaMsgAlertas(TForm2 *AForm, AnsiString Msg);
        void __fastcall ProcessaMsgOperacoes(TForm2 *AForm, AnsiString Msg);
        void __fastcall ProcessaMsgReferencias(TForm2 *AForm, AnsiString
Msg);
        void __fastcall ProcessaMsgExecucao(TForm2 *AForm, AnsiString Msg);
        void __fastcall ProcessaMsgAlteracoes(TForm2 *AForm, AnsiString
Msg);

        AnsiString __fastcall RetiraData(AnsiString data);

};
Thanks
João

-----Mensagem original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de DZ-Jay
Enviada: segunda-feira, 15 de Outubro de 2007 10:45
Para: ICS support mailing
Assunto: Re: [twsocket] problem with TCP server


On Oct 15, 2007, at 05:20, João Gonçalves wrote:

> When I receive data, with the function
> TTcpSrvForm::ClientDataAvailable(TObject *Sender, WORD Error), Ii do 
> the
> parsing of the string received and put it on a database. The problem 
> is when
> I have 2 clients, part of the information is ignored. I think it’s 
> because
> the same receive function is used by booth clients, is this true? And 
> if so,
> how can I solve this problem,

Are you using line mode?  Otherwise, the event will be triggered every 
time there is some data in the buffer, not when the entire data has 
been received.

        dZ.

-- 
        DZ-Jay [TeamICS]
        http://www.overbyte.be/eng/overbyte/teamics.html

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to