[twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Hello,
I currently working with C++ Builder 2009, and I'm trying to upgrade my TCP
server (based on the ICS TCPSRV demo) for this version, but I'm getting
several inconsistency and linker errors.
Can anyone give me a little help, on this?
Thank you
Best regards
João Gonçalves 

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


Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Hello,
After removing the const from the functions' prototypes, doesn't gives any
compiler errors, but the linker errors still persists. Here is the error
that gives:
[ILINK32 Error] Error: Unresolved external '__fastcall
Overbyteicswsocket::TCustomWSocket::SendTo(sockaddr_in, int, void * const,
int)' referenced from ...TCPSRV1.OBJ
[ILINK32 Error] Error: Unresolved external '__fastcall
Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString, unsigned
int)' referenced from ...TCPSRV1.OBJ
[ILINK32 Error] Error: Unresolved external '__fastcall
Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString)'
referenced from ...TCPSRV1.OBJ

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de João Gonçalves
Enviada: segunda-feira, 20 de Outubro de 2008 12:31
Para: 'ICS support mailing'
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

I will give it a try,
Thanks


-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Fastream Technologies
Enviada: segunda-feira, 20 de Outubro de 2008 12:26
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

Remove the const in the pascal source for the params of the functions it
reports.

On Mon, Oct 20, 2008 at 2:04 PM, João Gonçalves
[EMAIL PROTECTED]wrote:

 Hello, thank you for your answers,
 I'm using ICS v7.0 with the example TCPSRV from v5.
 In fact I have errors in the Send function, if I comment this part of the
 code, I get this linker error:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int, void *
 const, int)' referenced from
 D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 - DESENVOLVIMENTO\03 -
 INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ

 Regards
 João


 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em
 nome
 de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 11:39
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

 I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send(). Have
 they been fixed (the const should have been removed). Maybe that's the
 cause..?

 Regards,

 SZ

 On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED] wrote:

  João Gonçalves wrote:
   Hello,
   I currently working with C++ Builder 2009, and I'm trying to upgrade
   my TCP server (based on the ICS TCPSRV demo) for this version, but
   I'm getting several inconsistency and linker errors.
   Can anyone give me a little help, on this?
 
  AFAIK, ICS for C++ Builder 2009 is completely untested, there is a CB
  package included which builds w/o errors, that's all.
  Please provide the linker error text, also a minimal project that
  demonstrates the errors would be very helpful.
 
  --
  Arno Garrels
   --
 
  --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

 --

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

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

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


Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Hello,
Thank you for your help
Yes I did, but the linker error maintains 

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Fastream Technologies
Enviada: segunda-feira, 20 de Outubro de 2008 14:51
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

Hi,

Did you delete the obj files before recompilation?

Regards,

SZ

On Mon, Oct 20, 2008 at 4:37 PM, João Gonçalves
[EMAIL PROTECTED]wrote:

 Hello,
 After removing the const from the functions' prototypes, doesn't gives
 any
 compiler errors, but the linker errors still persists. Here is the error
 that gives:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(sockaddr_in, int, void *
const,
 int)' referenced from ...TCPSRV1.OBJ
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString,
unsigned
 int)' referenced from ...TCPSRV1.OBJ
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString)'
 referenced from ...TCPSRV1.OBJ

 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em
 nome
 de João Gonçalves
 Enviada: segunda-feira, 20 de Outubro de 2008 12:31
  Para: 'ICS support mailing'
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

 I will give it a try,
 Thanks


 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em
 nome
 de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 12:26
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

 Remove the const in the pascal source for the params of the functions it
 reports.

 On Mon, Oct 20, 2008 at 2:04 PM, João Gonçalves
 [EMAIL PROTECTED]wrote:

  Hello, thank you for your answers,
  I'm using ICS v7.0 with the example TCPSRV from v5.
  In fact I have errors in the Send function, if I comment this part of
the
  code, I get this linker error:
  [ILINK32 Error] Error: Unresolved external '__fastcall
  Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int, void
 *
  const, int)' referenced from
  D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 - DESENVOLVIMENTO\03 -
  INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ
 
  Regards
  João
 
 
  -Mensagem original-
  De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em
  nome
  de Fastream Technologies
  Enviada: segunda-feira, 20 de Outubro de 2008 11:39
  Para: ICS support mailing
  Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
  I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send(). Have
  they been fixed (the const should have been removed). Maybe that's the
  cause..?
 
  Regards,
 
  SZ
 
  On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED]
 wrote:
 
   João Gonçalves wrote:
Hello,
I currently working with C++ Builder 2009, and I'm trying to upgrade
my TCP server (based on the ICS TCPSRV demo) for this version, but
I'm getting several inconsistency and linker errors.
Can anyone give me a little help, on this?
  
   AFAIK, ICS for C++ Builder 2009 is completely untested, there is a CB
   package included which builds w/o errors, that's all.
   Please provide the linker error text, also a minimal project that
   demonstrates the errors would be very helpful.
  
   --
   Arno Garrels
--
  
   --
  To unsubscribe or change your settings for TWSocket mailing list
  please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
  Visit our website at http://www.overbyte.be
 
  --
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

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

 --

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

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


Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Hello,
That fixed the problem of the linker. However when I run the application and
try to connect a client, the following error appears:
Access violation at address F88BFC55. Read address F88FC55.
I'm working with the same example of TcpSrv used in icsv5, that worked
perfectly in C++ Builder 2007.
Thank you for the help
João
-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Arno Garrels
Enviada: segunda-feira, 20 de Outubro de 2008 14:56
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

João Gonçalves wrote:
 Hello,
 After removing the const from the functions' prototypes, doesn't
 gives any compiler errors, but the linker errors still persists. Here
 is the error that gives:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(sockaddr_in, int, void *
 const, int)' referenced from ...TCPSRV1.OBJ

In OverbyteIcsWSocket.pas, in both Interface and Implementation section of
the unit, replace (TCustomWSocket) SendTo by:

function SendTo(
Dest   : TSockAddr;
DestLen: Integer;
{$IFDEF CLR} const {$ENDIF} Data : TWSocketData;
Len: Integer) : Integer;

function TCustomWSocket.SendTo(
Dest   : TSockAddr;
DestLen: Integer;
{$IFDEF CLR} const {$ENDIF} Data : TWSocketData;
Len: Integer) : Integer;

You need to save and rebuild all afterwards.
It works for me, however TCPSRV demo starts and immediately
exits silently ??

 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString,
 unsigned int)' referenced from ...TCPSRV1.OBJ
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString)'
 referenced from ...TCPSRV1.OBJ

In the custom client class RcvdLine is declared as AnsiString.
Concatenation of UnicodeString and AnsiString seems to be the problem.
Declare RcvdLine as String and this error should go away. 

--
Arno Garrels

 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome de João Gonçalves
 Enviada: segunda-feira, 20 de Outubro de 2008 12:31
 Para: 'ICS support mailing'
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 I will give it a try,
 Thanks
 
 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 12:26
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 Remove the const in the pascal source for the params of the
 functions it reports.
 
 On Mon, Oct 20, 2008 at 2:04 PM, João Gonçalves
 [EMAIL PROTECTED]wrote:
 
 Hello, thank you for your answers,
 I'm using ICS v7.0 with the example TCPSRV from v5.
 In fact I have errors in the Send function, if I comment this part
 of the code, I get this linker error:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int,
 void * const, int)' referenced from
 D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 -
 DESENVOLVIMENTO\03 -
 INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ 
 
 Regards
 João
 
 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome
 de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 11:39
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send().
 Have they been fixed (the const should have been removed). Maybe
 that's the cause..?
 
 Regards,
 
 SZ
 
 On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED]
 wrote: 
 
 João Gonçalves wrote:
 Hello,
 I currently working with C++ Builder 2009, and I'm trying to
 upgrade my TCP server (based on the ICS TCPSRV demo) for this
 version, but I'm getting several inconsistency and linker errors.
 Can anyone give me a little help, on this?
 
 AFAIK, ICS for C++ Builder 2009 is completely untested, there is a
 CB package included which builds w/o errors, that's all.
 Please provide the linker error text, also a minimal project that
 demonstrates the errors would be very helpful.
 
 --
 Arno Garrels
  --
 
  --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 
 --
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo

Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
I will give it a try,
Thanks


-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Fastream Technologies
Enviada: segunda-feira, 20 de Outubro de 2008 12:26
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

Remove the const in the pascal source for the params of the functions it
reports.

On Mon, Oct 20, 2008 at 2:04 PM, João Gonçalves
[EMAIL PROTECTED]wrote:

 Hello, thank you for your answers,
 I'm using ICS v7.0 with the example TCPSRV from v5.
 In fact I have errors in the Send function, if I comment this part of the
 code, I get this linker error:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int, void *
 const, int)' referenced from
 D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 - DESENVOLVIMENTO\03 -
 INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ

 Regards
 João


 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em
 nome
 de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 11:39
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

 I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send(). Have
 they been fixed (the const should have been removed). Maybe that's the
 cause..?

 Regards,

 SZ

 On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED] wrote:

  João Gonçalves wrote:
   Hello,
   I currently working with C++ Builder 2009, and I'm trying to upgrade
   my TCP server (based on the ICS TCPSRV demo) for this version, but
   I'm getting several inconsistency and linker errors.
   Can anyone give me a little help, on this?
 
  AFAIK, ICS for C++ Builder 2009 is completely untested, there is a CB
  package included which builds w/o errors, that's all.
  Please provide the linker error text, also a minimal project that
  demonstrates the errors would be very helpful.
 
  --
  Arno Garrels
   --
 
  --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

 --

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

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


Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Hello, thank you for your answers,
I'm using ICS v7.0 with the example TCPSRV from v5. 
In fact I have errors in the Send function, if I comment this part of the
code, I get this linker error:
[ILINK32 Error] Error: Unresolved external '__fastcall
Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int, void *
const, int)' referenced from
D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 - DESENVOLVIMENTO\03 -
INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ 

Regards
João  


-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Fastream Technologies
Enviada: segunda-feira, 20 de Outubro de 2008 11:39
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send(). Have
they been fixed (the const should have been removed). Maybe that's the
cause..?

Regards,

SZ

On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED] wrote:

 João Gonçalves wrote:
  Hello,
  I currently working with C++ Builder 2009, and I'm trying to upgrade
  my TCP server (based on the ICS TCPSRV demo) for this version, but
  I'm getting several inconsistency and linker errors.
  Can anyone give me a little help, on this?

 AFAIK, ICS for C++ Builder 2009 is completely untested, there is a CB
 package included which builds w/o errors, that's all.
 Please provide the linker error text, also a minimal project that
 demonstrates the errors would be very helpful.

 --
 Arno Garrels
  --

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

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


Re: [twsocket] C++ Builder 2009 TCP Server

2008-10-20 Thread João Gonçalves
Thanks for the help 
I will try to debug the problem, but seems hard though!
João

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de Arno Garrels
Enviada: segunda-feira, 20 de Outubro de 2008 16:04
Para: ICS support mailing
Assunto: Re: [twsocket] C++ Builder 2009 TCP Server

João Gonçalves wrote:
 Hello,
 That fixed the problem of the linker. However when I run the
 application and try to connect a client, the following error appears:
 Access violation at address F88BFC55. Read address F88FC55.

No idea, I got it working as described below (zero CB-experience). 
Can't you set a break point in ClientDataAvailable and step thru 
the source code?

--
Arno Garrels

 I'm working with the same example of TcpSrv used in icsv5, that worked
 perfectly in C++ Builder 2007.
 Thank you for the help
 João
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome de Arno Garrels
 Enviada: segunda-feira, 20 de Outubro de 2008 14:56
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 João Gonçalves wrote:
 Hello,
 After removing the const from the functions' prototypes, doesn't
 gives any compiler errors, but the linker errors still persists. Here
 is the error that gives:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(sockaddr_in, int, void *
 const, int)' referenced from ...TCPSRV1.OBJ
 
 In OverbyteIcsWSocket.pas, in both Interface and Implementation
 section of the unit, replace (TCustomWSocket) SendTo by:
 
 function SendTo(
 Dest   : TSockAddr;
 DestLen: Integer;
 {$IFDEF CLR} const {$ENDIF} Data : TWSocketData;
 Len: Integer) : Integer;
 
 function TCustomWSocket.SendTo(
 Dest   : TSockAddr;
 DestLen: Integer;
 {$IFDEF CLR} const {$ENDIF} Data : TWSocketData;
 Len: Integer) : Integer;
 
 You need to save and rebuild all afterwards.
 It works for me, however TCPSRV demo starts and immediately
 exits silently ??
 
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString,
 unsigned int)' referenced from ...TCPSRV1.OBJ
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendStr(System::UnicodeString)'
 referenced from ...TCPSRV1.OBJ
 
 In the custom client class RcvdLine is declared as AnsiString.
 Concatenation of UnicodeString and AnsiString seems to be the problem.
 Declare RcvdLine as String and this error should go away.
 
 --
 Arno Garrels
 
 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome de João Gonçalves
 Enviada: segunda-feira, 20 de Outubro de 2008 12:31
 Para: 'ICS support mailing'
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 I will give it a try,
 Thanks
 
 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 12:26
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 Remove the const in the pascal source for the params of the
 functions it reports.
 
 On Mon, Oct 20, 2008 at 2:04 PM, João Gonçalves
 [EMAIL PROTECTED]wrote:
 
 Hello, thank you for your answers,
 I'm using ICS v7.0 with the example TCPSRV from v5.
 In fact I have errors in the Send function, if I comment this part
 of the code, I get this linker error:
 [ILINK32 Error] Error: Unresolved external '__fastcall
 Overbyteicswsocket::TCustomWSocket::SendTo(const sockaddr_in, int,
 void * const, int)' referenced from
 D:\DOCUMENTOS\DESENVOLVIMENTO\PROJECTOS\05908\03 -
 DESENVOLVIMENTO\03 -
 INFORMÁTICA\MYSERVER\CPP\INTERNET\BCB2006THREADS2\DEBUG\TCPSRV1.OBJ
 
 Regards
 João
 
 
 -Mensagem original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Em nome
 de Fastream Technologies
 Enviada: segunda-feira, 20 de Outubro de 2008 11:39
 Para: ICS support mailing
 Assunto: Re: [twsocket] C++ Builder 2009 TCP Server
 
 I have seen linker errors in ICSv6 with BCB2007 in TWSocket.Send().
 Have they been fixed (the const should have been removed). Maybe
 that's the cause..?
 
 Regards,
 
 SZ
 
 On Mon, Oct 20, 2008 at 1:16 PM, Arno Garrels [EMAIL PROTECTED]
 wrote:
 
 João Gonçalves wrote:
 Hello,
 I currently working with C++ Builder 2009, and I'm trying to
 upgrade my TCP server (based on the ICS TCPSRV demo) for this
 version, but I'm getting several inconsistency and linker errors.
 Can anyone give me a little help, on this?
 
 AFAIK, ICS for C++ Builder 2009 is completely untested, there is a
 CB package included which builds w/o errors, that's all.
 Please provide the linker error text, also a minimal project that
 demonstrates the errors would be very helpful.
 
 --
 Arno Garrels
  --
 
  --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto
 http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our

Re: [twsocket] small but pertinent doubt

2008-05-07 Thread João Gonçalves
Hello all,
After some experiments and some (huge) line codes, I have some updates
regarding this issue.
I adopted TcpSrv example, I'm using TWSocketServer component and associated
a new form for which client. In this way, each client updates the visual
aspect of the form accordingly. I think this is the best option!?
The results with 3 clients seems OK. I have some problems when I put the
Sleep function in a client method, because the server stays blind to
incoming data. Apart of that it is doing fine,
Just one question: TWSocktetServer property Multithreaded is used for what?
Thanks in advance
Regards
João


-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Em nome
de João Gonçalves
Enviada: domingo, 6 de Abril de 2008 13:37
Para: 'ICS support mailing'
Assunto: Re: [twsocket] small but pertinent doubt

Thanks for the help.
I you look into all these options and try to decide what's best.
Regards,
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: domingo, 6 de Abril de 2008 11:05
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

No you do not need thread to implement some flow control. First of all
you may not update visual controls from within a thread, so you have to
execute all this code in main thread context as well. Oke you can do
that by SendMessage or PostMessage.

Then if you need to display a from per client, it is the same problem.
All has to be done in main thread context. So I think you will make it
complicate if you use threads. You have to write thread safe code and do
all updates in main thread context.

So for the update of the main form table. I don't know exacly what you
are doing, but if you do as follow:

- client connect and send some data or whatever
- when data is received you temporary store it somewhere and you disable
  then enable a Timer.
- in OnTimer you update the table and delete the temporary data from
  each client.

This way table will update some time after a client, and when many
clients are updating it will wait a little for the update.

Of cours other approachs are also possible, this is just an idea. Hope
this helps.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, April 5, 2008, 19:33, João Gonçalves wrote:

 Let me explain why do I (think I) need a thread per client.
 I have a C++ builder app, with a main form, that has a table with the
 information of the status of several clients.
 When some client connects, it instantiates a new Form which is associated
to
 each client. I can view (and drag) this form along the main form.
 The problem is: when a client is updating it status, on the main form's
 table, if there is another client doing the same, the table goes crazy. I
 think I have to use threads in order to introduce some flow control on the
 mains form's table.
 Am I thinking straight?
 Thank you
 João 
  

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 16:27
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 If it is not in the list then I have to open all example files to see
 witch one. I know there is an example of running each client in
 separated thread.

 But are you sure you need a thread per client ???

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Saturday, April 5, 2008, 09:42, João Gonçalves wrote:

 Hello, once more thank you for your answer.
 I was referring to that list, I can't find the specific example that you
 speak. Are you referring to TcpSrv?
 Thanks
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 8:26
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Here http://www.overbyte.be/eng/products/ics.html#ics_apps is a complete
 discreption of all example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Saturday, April 5, 2008, 09:15, João Gonçalves wrote:

 Hello,
 Jus tone more thing: can youn point me to that example? I can't seem to
 find
 it:-(
 Thank you,
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 0:38
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 As far as I recall is mtSrv an older example with a listening TWSocket
 and creating data-TWSockets for the clients. So the example with
 TWSocketServer is the way to go.

 TWSocketServer is not multithread because it is not needed. It can
 handle thousands of connections in main thread. But if you want you can
 make separate thread

Re: [twsocket] small but pertinent doubt

2008-04-06 Thread João Gonçalves
Thanks for the help.
I you look into all these options and try to decide what's best.
Regards,
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: domingo, 6 de Abril de 2008 11:05
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

No you do not need thread to implement some flow control. First of all
you may not update visual controls from within a thread, so you have to
execute all this code in main thread context as well. Oke you can do
that by SendMessage or PostMessage.

Then if you need to display a from per client, it is the same problem.
All has to be done in main thread context. So I think you will make it
complicate if you use threads. You have to write thread safe code and do
all updates in main thread context.

So for the update of the main form table. I don't know exacly what you
are doing, but if you do as follow:

- client connect and send some data or whatever
- when data is received you temporary store it somewhere and you disable
  then enable a Timer.
- in OnTimer you update the table and delete the temporary data from
  each client.

This way table will update some time after a client, and when many
clients are updating it will wait a little for the update.

Of cours other approachs are also possible, this is just an idea. Hope
this helps.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, April 5, 2008, 19:33, João Gonçalves wrote:

 Let me explain why do I (think I) need a thread per client.
 I have a C++ builder app, with a main form, that has a table with the
 information of the status of several clients.
 When some client connects, it instantiates a new Form which is associated
to
 each client. I can view (and drag) this form along the main form.
 The problem is: when a client is updating it status, on the main form's
 table, if there is another client doing the same, the table goes crazy. I
 think I have to use threads in order to introduce some flow control on the
 mains form's table.
 Am I thinking straight?
 Thank you
 João 
  

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 16:27
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 If it is not in the list then I have to open all example files to see
 witch one. I know there is an example of running each client in
 separated thread.

 But are you sure you need a thread per client ???

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Saturday, April 5, 2008, 09:42, João Gonçalves wrote:

 Hello, once more thank you for your answer.
 I was referring to that list, I can't find the specific example that you
 speak. Are you referring to TcpSrv?
 Thanks
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 8:26
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Here http://www.overbyte.be/eng/products/ics.html#ics_apps is a complete
 discreption of all example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Saturday, April 5, 2008, 09:15, João Gonçalves wrote:

 Hello,
 Jus tone more thing: can youn point me to that example? I can't seem to
 find
 it:-(
 Thank you,
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 0:38
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 As far as I recall is mtSrv an older example with a listening TWSocket
 and creating data-TWSockets for the clients. So the example with
 TWSocketServer is the way to go.

 TWSocketServer is not multithread because it is not needed. It can
 handle thousands of connections in main thread. But if you want you can
 make separate thread for each client or for groups of clients if you
 have for example lengthy code to execute. There is an example with
 TWSocketServer also multitrheaded.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Friday, April 4, 2008, 22:45, João Gonçalves wrote:

 Hello, thank you for the answer
 In the application that I developed, taking the base of TcpSrv, I use
 TWSocketServer, 2 questions:
 - Is this multithread?
 - Is it better than MtSRv?

 Thank you
 João 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sexta-feira, 4 de Abril de 2008 8:29
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Use TWSocketServer component wich handles all clients by itself

Re: [twsocket] small but pertinent doubt

2008-04-05 Thread João Gonçalves
Hello,
Jus tone more thing: can youn point me to that example? I can't seem to find
it:-(
Thank you,
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: sábado, 5 de Abril de 2008 0:38
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

As far as I recall is mtSrv an older example with a listening TWSocket
and creating data-TWSockets for the clients. So the example with
TWSocketServer is the way to go.

TWSocketServer is not multithread because it is not needed. It can
handle thousands of connections in main thread. But if you want you can
make separate thread for each client or for groups of clients if you
have for example lengthy code to execute. There is an example with
TWSocketServer also multitrheaded.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Friday, April 4, 2008, 22:45, João Gonçalves wrote:

 Hello, thank you for the answer
 In the application that I developed, taking the base of TcpSrv, I use
 TWSocketServer, 2 questions:
 - Is this multithread?
 - Is it better than MtSRv?

 Thank you
 João 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sexta-feira, 4 de Abril de 2008 8:29
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Use TWSocketServer component wich handles all clients by itself. There
 are some example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, April 3, 2008, 23:17, João Gonçalves wrote:

 Hello,
 I developed an application in C++ Builder, based on the example TcpSrv.
It
 works very well, for a single client. I’m now trying to use several
 clients,
 looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
 booth say that this should  be used for a real world server. My question
 (doubt) is: what is more suitable to use?
 Thank in advance
 João 


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


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

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


Re: [twsocket] small but pertinent doubt

2008-04-05 Thread João Gonçalves
Hello, once more thank you for your answer.
I was referring to that list, I can't find the specific example that you
speak. Are you referring to TcpSrv?
Thanks
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: sábado, 5 de Abril de 2008 8:26
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

Here http://www.overbyte.be/eng/products/ics.html#ics_apps is a complete
discreption of all example files.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, April 5, 2008, 09:15, João Gonçalves wrote:

 Hello,
 Jus tone more thing: can youn point me to that example? I can't seem to
find
 it:-(
 Thank you,
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 0:38
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 As far as I recall is mtSrv an older example with a listening TWSocket
 and creating data-TWSockets for the clients. So the example with
 TWSocketServer is the way to go.

 TWSocketServer is not multithread because it is not needed. It can
 handle thousands of connections in main thread. But if you want you can
 make separate thread for each client or for groups of clients if you
 have for example lengthy code to execute. There is an example with
 TWSocketServer also multitrheaded.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Friday, April 4, 2008, 22:45, João Gonçalves wrote:

 Hello, thank you for the answer
 In the application that I developed, taking the base of TcpSrv, I use
 TWSocketServer, 2 questions:
 - Is this multithread?
 - Is it better than MtSRv?

 Thank you
 João 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sexta-feira, 4 de Abril de 2008 8:29
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Use TWSocketServer component wich handles all clients by itself. There
 are some example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, April 3, 2008, 23:17, João Gonçalves wrote:

 Hello,
 I developed an application in C++ Builder, based on the example TcpSrv.
 It
 works very well, for a single client. I’m now trying to use several
 clients,
 looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
 booth say that this should  be used for a real world server. My question
 (doubt) is: what is more suitable to use?
 Thank in advance
 João 


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


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


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

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


Re: [twsocket] small but pertinent doubt

2008-04-05 Thread João Gonçalves
OK, let me se if I understood
The best option is to take the TCpSrv example from ICs, put it on a new
Thread, and create a new Thread for each client, like the example on the
MtSrv?
Is this line of thinking correct?
Thanks once more
João

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dod
Sent: sábado, 5 de Abril de 2008 8:45
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

One  more  thing,  I recommend you to create the TWSocketServer into a
separated  thread  just  to  avoid  your  appplication interface to be
overloaded/non responsive in case of hudge activity.

You  can  also  dettach  some client sockets and attach them into some
separated  thread if they may take longer time to execute (for exemple
long database request or disk file activity).

As ICS uses an event driven model this permit to manage very easy tons
of  connections  but  you  must  be responsive and make each triggered
event  finish  as  fast  as possible or the next event (for exemple an
other OnDataAvailable for other client) will have to wait.

You may also create some worker thread that you can send thoses longer
operation the release the event faster.

Regards.

JG Hello,
JG Jus tone more thing: can youn point me to that example? I can't seem to
find
JG it:-(
JG Thank you,
JG João

JG -Original Message-
JG From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On
JG Behalf Of Wilfried Mestdagh
JG Sent: sábado, 5 de Abril de 2008 0:38
JG To: ICS support mailing
JG Subject: Re: [twsocket] small but pertinent doubt

JG Hello João,

JG As far as I recall is mtSrv an older example with a listening TWSocket
JG and creating data-TWSockets for the clients. So the example with
JG TWSocketServer is the way to go.

JG TWSocketServer is not multithread because it is not needed. It can
JG handle thousands of connections in main thread. But if you want you can
JG make separate thread for each client or for groups of clients if you
JG have for example lengthy code to execute. There is an example with
JG TWSocketServer also multitrheaded.

JG ---
JG Rgds, Wilfried [TeamICS]
JG http://www.overbyte.be/eng/overbyte/teamics.html
JG http://www.mestdagh.biz

JG Friday, April 4, 2008, 22:45, João Gonçalves wrote:

 Hello, thank you for the answer
 In the application that I developed, taking the base of TcpSrv, I use
 TWSocketServer, 2 questions:
 - Is this multithread?
 - Is it better than MtSRv?

 Thank you
 João 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sexta-feira, 4 de Abril de 2008 8:29
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Use TWSocketServer component wich handles all clients by itself. There
 are some example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, April 3, 2008, 23:17, João Gonçalves wrote:

 Hello,
 I developed an application in C++ Builder, based on the example TcpSrv.
JG It
 works very well, for a single client. I’m now trying to use several
 clients,
 looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
 booth say that this should  be used for a real world server. My question
 (doubt) is: what is more suitable to use?
 Thank in advance
 João 


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


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


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

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


Re: [twsocket] small but pertinent doubt

2008-04-05 Thread João Gonçalves
Let me explain why do I (think I) need a thread per client.
I have a C++ builder app, with a main form, that has a table with the
information of the status of several clients.
When some client connects, it instantiates a new Form which is associated to
each client. I can view (and drag) this form along the main form.
The problem is: when a client is updating it status, on the main form's
table, if there is another client doing the same, the table goes crazy. I
think I have to use threads in order to introduce some flow control on the
mains form's table.
Am I thinking straight?
Thank you
João 
  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: sábado, 5 de Abril de 2008 16:27
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

If it is not in the list then I have to open all example files to see
witch one. I know there is an example of running each client in
separated thread.

But are you sure you need a thread per client ???

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Saturday, April 5, 2008, 09:42, João Gonçalves wrote:

 Hello, once more thank you for your answer.
 I was referring to that list, I can't find the specific example that you
 speak. Are you referring to TcpSrv?
 Thanks
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 8:26
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Here http://www.overbyte.be/eng/products/ics.html#ics_apps is a complete
 discreption of all example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Saturday, April 5, 2008, 09:15, João Gonçalves wrote:

 Hello,
 Jus tone more thing: can youn point me to that example? I can't seem to
 find
 it:-(
 Thank you,
 João

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sábado, 5 de Abril de 2008 0:38
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 As far as I recall is mtSrv an older example with a listening TWSocket
 and creating data-TWSockets for the clients. So the example with
 TWSocketServer is the way to go.

 TWSocketServer is not multithread because it is not needed. It can
 handle thousands of connections in main thread. But if you want you can
 make separate thread for each client or for groups of clients if you
 have for example lengthy code to execute. There is an example with
 TWSocketServer also multitrheaded.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Friday, April 4, 2008, 22:45, João Gonçalves wrote:

 Hello, thank you for the answer
 In the application that I developed, taking the base of TcpSrv, I use
 TWSocketServer, 2 questions:
 - Is this multithread?
 - Is it better than MtSRv?

 Thank you
 João 

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: sexta-feira, 4 de Abril de 2008 8:29
 To: ICS support mailing
 Subject: Re: [twsocket] small but pertinent doubt

 Hello João,

 Use TWSocketServer component wich handles all clients by itself. There
 are some example files.

 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz

 Thursday, April 3, 2008, 23:17, João Gonçalves wrote:

 Hello,
 I developed an application in C++ Builder, based on the example TcpSrv.
 It
 works very well, for a single client. I’m now trying to use several
 clients,
 looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
 booth say that this should  be used for a real world server. My
question
 (doubt) is: what is more suitable to use?
 Thank in advance
 João 


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


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


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


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

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


Re: [twsocket] small but pertinent doubt

2008-04-04 Thread João Gonçalves
Hello, thank you for the answer
In the application that I developed, taking the base of TcpSrv, I use
TWSocketServer, 2 questions:
- Is this multithread?
- Is it better than MtSRv?

Thank you
João 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: sexta-feira, 4 de Abril de 2008 8:29
To: ICS support mailing
Subject: Re: [twsocket] small but pertinent doubt

Hello João,

Use TWSocketServer component wich handles all clients by itself. There
are some example files.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Thursday, April 3, 2008, 23:17, João Gonçalves wrote:

 Hello,
 I developed an application in C++ Builder, based on the example TcpSrv. It
 works very well, for a single client. I’m now trying to use several
clients,
 looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
 booth say that this should  be used for a real world server. My question
 (doubt) is: what is more suitable to use?
 Thank in advance
 João 


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

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


[twsocket] small but pertinent doubt

2008-04-03 Thread João Gonçalves
Hello,
I developed an application in C++ Builder, based on the example TcpSrv. It
works very well, for a single client. I’m now trying to use several clients,
looking to the documentation, ICS has 2 examples: MtSrv and TnSrv, they
booth say that this should  be used for a real world server. My question
(doubt) is: what is more suitable to use?
Thank in advance
João 

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


[twsocket] problem with TCP server

2007-10-15 Thread João Gonçalves
Hello, I’m working with the TCP server example supplied,

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,

Thanks in advance,

Best regards,

 

 

João Gonçalves 

[EMAIL PROTECTED]

-- 
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


Re: [twsocket] problem with TCP server

2007-10-15 Thread João Gonçalves
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


Re: [twsocket] problem with TCP server

2007-10-15 Thread João Gonçalves
Hello,
I have to use linemode to false, since the server receives data from
independent hardware modules. If I put it to true, I receive a character at
a time.
My problem is that the processing of some data takes a quite amount of time,
and the server doesn´t processes the data,
Is there any way of solving this problem?
Thanks
Best regards
João

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


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

 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();

If you set LineMode=True, the OnDataAvailable event will trigger when 
the entire data is received (and the line-delimiter is found).  I think 
this is what you want.  Otherwise, it will trigger whenever the buffer 
is full and there is *some* data, and it is up to you to piece it 
together (this is what you have now).

That last one is intended for streaming, where you are not expecting 
a specific line of data, but a constant stream of data.  If you are 
sending commands, like other common Internet protocols, then you should 
set LineMode to True.  The default line-delimiter is #13#10 
(CarriageReturn+LineFeed), like other Internet protocols, but you can 
set it to whatever you want.

You also should set the LineLimit property to the maximum allowed 
length of a line, otherwise your server may be vulnerable to DoS 
attacks (since it will continue growing a buffer if no delimiter is 
sent, and all memory may be consumed).  When the LineLimit maximum is 
reached, an exception is triggered (which you can handle in 
OnLineLimitExceeded event).

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