[twsocket] TWsocket server client list Error

2006-10-05 Thread Miguel Ca

Hi

I am using TwSocketServer in a service application that receives information 
from a POS Machine (using TCP) and I am having problems with the number of 
clients that shows WSocketServerEx.ClientCount. In some cases clientcount 
return more connections than the number of machines that I have connected to 
the service.  I am saving the client list in txt file and it shows this;


[04/10/2006 17:24:09:296] --D Activa[0] IP [] PORT []
[04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
[04/10/2006 17:24:09:296] --D Activa[2] IP [] PORT []
[04/10/2006 17:24:09:296] --D Activa[3] IP [10.10.10.237] PORT [2379]

What happen with the positions 0,1 and 2 that shows no port or ip??

I have found this exception 2 segs before the addition of a new 'empty´(no 
ip or port) connection and was capture in WSocketServerExBgException.


[04/10/2006 17:24:07:453] [ESocketException] Msg[Error 10038 in function 
Disconnect (closesocket)

Socket operation on non-socket]

Is there a relationship between this exception and the addition of the new 
empty connection? or I have to look for the error in another place.

Any help would be appreciated.

Thank you

Miguel Angel Cañas C.

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-- 
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] FtpCli upload problem

2006-10-05 Thread New Era
Thanks for the tip but could not get the FtpCommon.pas, it is not on the 
Davie's web site (deadlink). If you have, could you post it to me thanks..

Fastream Technologies [EMAIL PROTECTED] wrote: Then I think you have no other 
choice then issuing a LIST and parsing the 
folder listing with Davie's code.

Regards,

SZ

- Original Message - 
From: New Era 
To: ICS support mailing 
Sent: Tuesday, October 03, 2006 10:13 AM
Subject: Re: [twsocket] FtpCli upload problem


: Hi, if server does not support SIZE, MD5  then what is the best way to 
make that check?
:
: Arno Garrels  wrote:  New Era wrote:
:  Thanks for the reply and advice,
:  I looked at the component again it contains a property if I am not
:  wrong isSent or named with a similiar name. Looked the property in
:  the source code, it also checks the status against 226 and with
:  other some constants. Anyway I will do the check you suggested
:
: In the FTP size of an upload is unknown to the server. The server
: assumes success when the client closes the data channel gracefully.
: So a file may have been corrupted even though you got an OK response.
: The client is responsible to check whether both local and remote
: files are the same either by comparing their size or more reliable
: by comparing their MD5 checksum (command MD5). Unfortunately MD5 is
: not supported on every server.
:
: ---
: Arno Garrels [TeamICS]
: http://www.overbyte.be/eng/overbyte/teamics.html
:
:
:
: 
: 
: 
:  Dan wrote: Not sure why it happens, but to
:  guard against this I would do a SIZE command on the remote file after
:  uploading it, then check if it matches the local file size before
:  deleting it. SIZE is supported by every FTP server I have used,
:  although I'm not sure if its in the initial FTP RFC.
: 
:  Dan
: 
:  -Original Message-
:  From: [EMAIL PROTECTED] [mailto:twsocket-
:  [EMAIL PROTECTED] On Behalf Of New Era
:  Sent: 21 September 2006 12:10
:  To: twsocket@elists.org
:  Subject: [twsocket] FtpCli upload problem
: 
: 
:  [input] [input] [input] [input]
: 
:  I am using the following code in the FtpRequestDone event handler;
: 
:  case RqType of
:  ...
: 
: 
:  ftpPutAsync: begin
:  if(FtpCli.StatusCode= 226) then Delete(FileName);
:  
:  end;
: 
:  
:  end;
:  What I am trying to do is to upload a file to server then delete the
:  local file. In fact this code is working for the many cases but there
:  are a few cases where the server says that uploaded files (local file
:  sizes are greater than 0 bytes) are zero bytes length and the
:  localfile is deleted. What is wrong? I am using passive mode.
: 
:  thanks.
: 
: 
:  -
:  Try the all-new Yahoo! Mail . The New Version is radically easier
:  to use - The Wall Street Journal
:  --
:  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
: 
: 
: 
:  -
:  All new Yahoo! Mail The new Interface is stunning in its simplicity
:  and ease of use. - PC Magazine
: -- 
: 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
:
:
:
: -
: Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with 
voicemail
: -- 
: 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



-
 The all-new Yahoo! Mail goes wherever you go - free your email address from 
your Internet provider.
-- 
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] TWsocket server client list Error

2006-10-05 Thread Wilfried Mestdagh
Hello Miguel,

BGException is background exception. It comes from the message pump.
This means it can come also from your code in one of the TWSocket
events. To test put them all in a exception block until you found the
error (if it is over there of course).

Socket operation on a non socket means that somewhere some handle is
overwritten. Mostly this comes because you have somewhere written
outside a variable (so written [partly] to another).

This is not nececary the same moment but has happend a little while
before it.

Also possible is that you have a pointer to a datasocket that is not
exestant anymore. If you have an array of sockets or so, be sure to
update it on OnClientConnect / OnClientDisconnect. Remember also that in
OnClientDisconnect the datasocket in question is still there, it is
called before it is destroyed (also the count argument).

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

Thursday, October 5, 2006, 09:06, Miguel Cañas wrote:

 Hi

 I am using TwSocketServer in a service application that receives information
 from a POS Machine (using TCP) and I am having problems with the number of
 clients that shows WSocketServerEx.ClientCount. In some cases clientcount
 return more connections than the number of machines that I have connected to
 the service.  I am saving the client list in txt file and it shows this;

 [04/10/2006 17:24:09:296] --D Activa[0] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[2] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[3] IP [10.10.10.237] PORT [2379]

 What happen with the positions 0,1 and 2 that shows no port or ip??

 I have found this exception 2 segs before the addition of a new 'emptyŽ(no
 ip or port) connection and was capture in WSocketServerExBgException.

 [04/10/2006 17:24:07:453] [ESocketException] Msg[Error 10038 in function
 Disconnect (closesocket)
 Socket operation on non-socket]

 Is there a relationship between this exception and the addition of the new
 empty connection? or I have to look for the error in another place.
 Any help would be appreciated.

 Thank you

 Miguel Angel Cañas C.

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-- 
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] TWsocket server client list Error

2006-10-05 Thread Miguel Ca

Thank you for the answer Wilfried

Im following your suggestios and I will test the Wsockets events today with 
try .. except blocks to try to find the error.


However I want to ask something to, Is there a theory for the connections 
without IP and PORT that shows the TWsocketServer.client[i]?


[04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []

because I have a procedure that check for connections to make a close socket 
in case that some timeotu expired, the code looks like this:


//check for a valid client
   if WSocketServerEx.IsClient( WSocketServerEx.Client[ i ] ) then
   begin
//Close socket. Nothing send.
 TTcpSrvClient( WSocketServerEx.Client[ i ] ).Close;
  end;
I can see thar in the case of the no IP no port connections i can do a 
.Close call


Thank you

Miguel Angel Cañas C.



From: Wilfried Mestdagh [EMAIL PROTECTED]
Reply-To: ICS support mailing twsocket@elists.org
To: ICS support mailing twsocket@elists.org
Subject: Re: [twsocket] TWsocket server client list Error
Date: Thu, 5 Oct 2006 12:42:03 +0200

Hello Miguel,

BGException is background exception. It comes from the message pump.
This means it can come also from your code in one of the TWSocket
events. To test put them all in a exception block until you found the
error (if it is over there of course).

Socket operation on a non socket means that somewhere some handle is
overwritten. Mostly this comes because you have somewhere written
outside a variable (so written [partly] to another).

This is not nececary the same moment but has happend a little while
before it.

Also possible is that you have a pointer to a datasocket that is not
exestant anymore. If you have an array of sockets or so, be sure to
update it on OnClientConnect / OnClientDisconnect. Remember also that in
OnClientDisconnect the datasocket in question is still there, it is
called before it is destroyed (also the count argument).

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

Thursday, October 5, 2006, 09:06, Miguel Cañas wrote:

 Hi

 I am using TwSocketServer in a service application that receives 
information
 from a POS Machine (using TCP) and I am having problems with the number 
of
 clients that shows WSocketServerEx.ClientCount. In some cases 
clientcount
 return more connections than the number of machines that I have 
connected to

 the service.  I am saving the client list in txt file and it shows this;

 [04/10/2006 17:24:09:296] --D Activa[0] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[2] IP [] PORT []
 [04/10/2006 17:24:09:296] --D Activa[3] IP [10.10.10.237] PORT [2379]

 What happen with the positions 0,1 and 2 that shows no port or ip??

 I have found this exception 2 segs before the addition of a new 
'empty´(no

 ip or port) connection and was capture in WSocketServerExBgException.

 [04/10/2006 17:24:07:453] [ESocketException] Msg[Error 10038 in function
 Disconnect (closesocket)
 Socket operation on non-socket]

 Is there a relationship between this exception and the addition of the 
new

 empty connection? or I have to look for the error in another place.
 Any help would be appreciated.

 Thank you

 Miguel Angel Cañas C.

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-- 
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] TWsocket server client list Error

2006-10-05 Thread Fastream Technologies
Yes we have the same problem even though no exceptions are raised. This 
occurs with high traffic--especially sockets disconnecting with 
errors/abort.

Regards,

SZ

- Original Message - 
From: Miguel Cañas [EMAIL PROTECTED]
To: twsocket@elists.org
Sent: Thursday, October 05, 2006 4:37 PM
Subject: Re: [twsocket] TWsocket server client list Error


: Thank you for the answer Wilfried
:
: Im following your suggestios and I will test the Wsockets events today 
with
: try .. except blocks to try to find the error.
:
: However I want to ask something to, Is there a theory for the connections
: without IP and PORT that shows the TWsocketServer.client[i]?
:
: [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
:
: because I have a procedure that check for connections to make a close 
socket
: in case that some timeotu expired, the code looks like this:
:
: //check for a valid client
:if WSocketServerEx.IsClient( WSocketServerEx.Client[ i ] ) then
:begin
: //Close socket. Nothing send.
:  TTcpSrvClient( WSocketServerEx.Client[ i ] ).Close;
:   end;
: I can see thar in the case of the no IP no port connections i can do a
: .Close call
:
: Thank you
:
: Miguel Angel Cañas C.
:
:
: From: Wilfried Mestdagh [EMAIL PROTECTED]
: Reply-To: ICS support mailing twsocket@elists.org
: To: ICS support mailing twsocket@elists.org
: Subject: Re: [twsocket] TWsocket server client list Error
: Date: Thu, 5 Oct 2006 12:42:03 +0200
: 
: Hello Miguel,
: 
: BGException is background exception. It comes from the message pump.
: This means it can come also from your code in one of the TWSocket
: events. To test put them all in a exception block until you found the
: error (if it is over there of course).
: 
: Socket operation on a non socket means that somewhere some handle is
: overwritten. Mostly this comes because you have somewhere written
: outside a variable (so written [partly] to another).
: 
: This is not nececary the same moment but has happend a little while
: before it.
: 
: Also possible is that you have a pointer to a datasocket that is not
: exestant anymore. If you have an array of sockets or so, be sure to
: update it on OnClientConnect / OnClientDisconnect. Remember also that in
: OnClientDisconnect the datasocket in question is still there, it is
: called before it is destroyed (also the count argument).
: 
: ---
: Rgds, Wilfried [TeamICS]
: http://www.overbyte.be/eng/overbyte/teamics.html
: http://www.mestdagh.biz
: 
: Thursday, October 5, 2006, 09:06, Miguel Cañas wrote:
: 
:   Hi
: 
:   I am using TwSocketServer in a service application that receives
: information
:   from a POS Machine (using TCP) and I am having problems with the 
number
: of
:   clients that shows WSocketServerEx.ClientCount. In some cases
: clientcount
:   return more connections than the number of machines that I have
: connected to
:   the service.  I am saving the client list in txt file and it shows 
this;
: 
:   [04/10/2006 17:24:09:296] --D Activa[0] IP [] PORT []
:   [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
:   [04/10/2006 17:24:09:296] --D Activa[2] IP [] PORT []
:   [04/10/2006 17:24:09:296] --D Activa[3] IP [10.10.10.237] PORT [2379]
: 
:   What happen with the positions 0,1 and 2 that shows no port or ip??
: 
:   I have found this exception 2 segs before the addition of a new
: 'empty´(no
:   ip or port) connection and was capture in WSocketServerExBgException.
: 
:   [04/10/2006 17:24:07:453] [ESocketException] Msg[Error 10038 in 
function
:   Disconnect (closesocket)
:   Socket operation on non-socket]
: 
:   Is there a relationship between this exception and the addition of the
: new
:   empty connection? or I have to look for the error in another place.
:   Any help would be appreciated.
: 
:   Thank you
: 
:   Miguel Angel Cañas C.
: 
:   _
:   Express yourself instantly with MSN Messenger! Download today it's 
FREE!
:   http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
: 
: 
: --
: 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
:
: _
: Express yourself instantly with MSN Messenger! Download today it's FREE!
: http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
:
:





: -- 
: 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] TWsocket server client list Error

2006-10-05 Thread Wilfried Mestdagh
Hello Miguel,

 However I want to ask something to, Is there a theory for the connections
 without IP and PORT that shows the TWsocketServer.client[i]?

No I have no theory at the momen. With empty  IP and Port, which
properties do you exacly mean ?

 in case that some timeotu expired, the code looks like this:

Code looks OK to me.

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

Thursday, October 5, 2006, 15:37, Miguel Cañas wrote:

 Thank you for the answer Wilfried

 Im following your suggestios and I will test the Wsockets events today with
 try .. except blocks to try to find the error.

 However I want to ask something to, Is there a theory for the connections
 without IP and PORT that shows the TWsocketServer.client[i]?

 [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []

 because I have a procedure that check for connections to make a close socket
 in case that some timeotu expired, the code looks like this:

 //check for a valid client
 if WSocketServerEx.IsClient( WSocketServerEx.Client[ i ] ) then
 begin
  //Close socket. Nothing send.
   TTcpSrvClient( WSocketServerEx.Client[ i ] ).Close;
end;
 I can see thar in the case of the no IP no port connections i can do a
 .Close call

 Thank you

 Miguel Angel Cañas C.


From: Wilfried Mestdagh [EMAIL PROTECTED]
Reply-To: ICS support mailing twsocket@elists.org
To: ICS support mailing twsocket@elists.org
Subject: Re: [twsocket] TWsocket server client list Error
Date: Thu, 5 Oct 2006 12:42:03 +0200

Hello Miguel,

BGException is background exception. It comes from the message pump.
This means it can come also from your code in one of the TWSocket
events. To test put them all in a exception block until you found the
error (if it is over there of course).

Socket operation on a non socket means that somewhere some handle is
overwritten. Mostly this comes because you have somewhere written
outside a variable (so written [partly] to another).

This is not nececary the same moment but has happend a little while
before it.

Also possible is that you have a pointer to a datasocket that is not
exestant anymore. If you have an array of sockets or so, be sure to
update it on OnClientConnect / OnClientDisconnect. Remember also that in
OnClientDisconnect the datasocket in question is still there, it is
called before it is destroyed (also the count argument).

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

Thursday, October 5, 2006, 09:06, Miguel Cañas wrote:

  Hi

  I am using TwSocketServer in a service application that receives 
information
  from a POS Machine (using TCP) and I am having problems with the number
of
  clients that shows WSocketServerEx.ClientCount. In some cases 
clientcount
  return more connections than the number of machines that I have 
connected to
  the service.  I am saving the client list in txt file and it shows this;

  [04/10/2006 17:24:09:296] --D Activa[0] IP [] PORT []
  [04/10/2006 17:24:09:296] --D Activa[1] IP [] PORT []
  [04/10/2006 17:24:09:296] --D Activa[2] IP [] PORT []
  [04/10/2006 17:24:09:296] --D Activa[3] IP [10.10.10.237] PORT [2379]

  What happen with the positions 0,1 and 2 that shows no port or ip??

  I have found this exception 2 segs before the addition of a new 
'emptyŽ(no
  ip or port) connection and was capture in WSocketServerExBgException.

  [04/10/2006 17:24:07:453] [ESocketException] Msg[Error 10038 in function
  Disconnect (closesocket)
  Socket operation on non-socket]

  Is there a relationship between this exception and the addition of the
new
  empty connection? or I have to look for the error in another place.
  Any help would be appreciated.

  Thank you

  Miguel Angel Cañas C.

  _
  Express yourself instantly with MSN Messenger! Download today it's FREE!
  http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

 _
 Express yourself instantly with MSN Messenger! Download today it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


-- 
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] TWsocket server client list Error

2006-10-05 Thread Wilfried Mestdagh
Hello Fastream,

But if a client disconnect with an error in high traffic, which events
are you logging ?  Seems a wierd problem to me...

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

-- 
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] TWsocket server client list Error

2006-10-05 Thread Fastream Technologies
It seems the Client[] is not up to date. Perhaps we should remove the client 
from there when the disconnect signal is received? (not when the object is 
destroyed?)

Best Regards,

SubZero

- Original Message - 
From: Wilfried Mestdagh [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Thursday, October 05, 2006 5:01 PM
Subject: Re: [twsocket] TWsocket server client list Error


: Hello Fastream,
:
: But if a client disconnect with an error in high traffic, which events
: are you logging ?  Seems a wierd problem to me...
:
: ---
: Rgds, Wilfried [TeamICS]
: http://www.overbyte.be/eng/overbyte/teamics.html
: http://www.mestdagh.biz
:
: -- 
: 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


[twsocket] Authenticate event FTPServer

2006-10-05 Thread Arnold FLUTEAUX
Hi,

 

In authenticate event of ftpserver, I do some tests and if my tests aren't
ok, I set authenticated  (one param of event) to false. But my clientcount
is yet with this client. So I must do:

Authenticated :=false;

PostMessage(ftpserveur.Handle, WM_FTPSRV_CLOSE_REQUEST,

WPARAM(client.ID),LPARAM(Client));

 

To get a good value of clientcount.

Is it OK or not ?

 

Arnold

 

-- 
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] Authenticate event FTPServer

2006-10-05 Thread Arno Garrels
Arnold FLUTEAUX wrote:
 Hi,
 
 
 
 In authenticate event of ftpserver, I do some tests and if my tests
 aren't ok, I set authenticated  (one param of event) to false. But
 my clientcount is yet with this client. So I must do:
 
 Authenticated :=false;
 
 PostMessage(ftpserveur.Handle, WM_FTPSRV_CLOSE_REQUEST,
 
 WPARAM(client.ID),LPARAM(Client));
 
 
 
 To get a good value of clientcount.
 
 Is it OK or not ?

You may close the client connection if you want (may be after a couple of failed
attempts only?), the component does not do it for you. It is much easier to call
Client.CloseDelayed.


---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
 

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


[twsocket] MD5 check needed ?

2006-10-05 Thread Arno Garrels
Hello,

I'm writting a small C/S protocol. It includes sending/receiving
database records. Would you suggest to send and check a MD5 checksum?
May be it is OK to live with this overhead only upon database write
requests?

Arno Garrels 



-- 
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] MD5 check needed ?

2006-10-05 Thread Fastream Technologies
Hello Arno,

AFAIK TCP already does CRC per packet so MD5 may be a bit expensive
(doing additionally).

Regards,

SZ

On 10/5/06, Arno Garrels [EMAIL PROTECTED] wrote:
 Hello,

 I'm writting a small C/S protocol. It includes sending/receiving
 database records. Would you suggest to send and check a MD5 checksum?
 May be it is OK to live with this overhead only upon database write
 requests?

 Arno Garrels



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



-- 
Fastream Technologies
Software IQ: Innovation  Quality
www.fastream.com | Email: [EMAIL PROTECTED] | Tel: +90-312-223-2830
-- 
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] MD5 check needed ?

2006-10-05 Thread Arno Garrels
Fastream Technologies wrote:
 Hello Arno,
 
 AFAIK TCP already does CRC per packet so MD5 may be a bit expensive
 (doing additionally).

What happens in ICS when a corrupted packet has been received?
Is DataAvailable being triggered with an error  0 ?

 
 Regards,
 
 SZ
 
 On 10/5/06, Arno Garrels [EMAIL PROTECTED] wrote:
 Hello,
 
 I'm writting a small C/S protocol. It includes sending/receiving
 database records. Would you suggest to send and check a MD5 checksum?
 May be it is OK to live with this overhead only upon database write
 requests?
 
 Arno Garrels
 
 
 
 --
 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
 
 
 
 --
 Fastream Technologies
 Software IQ: Innovation  Quality
 www.fastream.com | Email: [EMAIL PROTECTED] | Tel: +90-312-223-2830
-- 
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] MD5 check needed ?

2006-10-05 Thread Wilfried Mestdagh
Hello Arno,

 What happens in ICS when a corrupted packet has been received?
 Is DataAvailable being triggered with an error  0 ?

I assume you use TCP. No need for additional check. I never have seen a
corrupt packet in TCP. Even not on radio networks where there is planty
of noise.

If I recall whell I even never have seen a Winsock error in
OnDataAvaliable. Only received count = 0 if there is close or an error.

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

-- 
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] MD5 check needed ?

2006-10-05 Thread Arno Garrels
Wilfried Mestdagh wrote:
 Hello Arno,
 
 What happens in ICS when a corrupted packet has been received?
 Is DataAvailable being triggered with an error  0 ?
 
 I assume you use TCP. 

Yes I do.

 No need for additional check. I never have seen
 a corrupt packet in TCP. Even not on radio networks where there is
 planty of noise.
 
 If I recall whell I even never have seen a Winsock error in
 OnDataAvaliable. Only received count = 0 if there is close or an
 error. 

So I will forget that and sleep well in the future, anyway it's much
faster w/o a check, and I like it fast ;-) 

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
-- 
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] MD5 check needed ?

2006-10-05 Thread Arno Garrels
Francois PIETTE wrote:
 I'm writting a small C/S protocol. It includes sending/receiving
 database records.
 = No need: TCP stream already has error detection and correction

I wasn't sure about how Winsock/ICS handles simple data corruption.
What would happen if it happens?
 
 To detect man in the middle data alteration ?

No, the man in the middle could easily adjust the MD5-sum.

 = Well why not if you need this kind of security and doesn't want to
 use SSL

Sure, SSL is a user-option. Usually there's no need to use SSL inside
the LAN, but who knows?  

 
 
 --
 Contribute to the SSL Effort. Visit
 http://www.overbyte.be/eng/ssl.html --
 [EMAIL PROTECTED]
 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] MD5 check needed ?

2006-10-05 Thread Wilfried Mestdagh
Hello Arno,

 I wasn't sure about how Winsock/ICS handles simple data corruption.
 What would happen if it happens?

Packets are resent. The amount of packets is depending the size of the
receive window. If memory serve the receive window (where TCP send ACK)
can be till 8 kb.

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

-- 
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] How stable is ICS V6 ?

2006-10-05 Thread Éric Fleming Bonilha
I have also upgraded my server and client framework to use ICS 6 and it is 
running just excellent.
I´m using ICS 6 on my camera surveillance software, so the server should be 
able to manage hundreds simmultaneous connections and should be able to work 
on extreme load scenarios. ICS 6 is totally stable and we have customers 
that have heavy network traffic (300 Mbps avg) and ICS is working perfectly

Congratulations to the ICS team


Éric

- Original Message - 
From: Erich Kuba [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Thursday, October 05, 2006 4:52 AM
Subject: [twsocket] How stable is ICS V6 ?


 Hi All,

 I've been using the ICS components for about 6 or 7 years now, and I have 
 to
 say well done to Francois and everyone else who has contributed over the
 years.  I've written some reasonably large server oriented systems using 
 the
 TWSocket component as the basis for a server framework that I've 
 developed.
 Some of these systems handle several hundred thousand requests per day. 
 All
 of the systems in production are compiled with ICS V5.

 I've recently upgraded my server framework to use ICS V6, and am at the
 point where I have a reasonably stable build, but have noticed a few 
 snags,
 random stuff, like server sockets stopping listening under load.  Now I am
 not entirely sure if these problems are in the ICS V6 components or my
 server framework, as I upgraded the framework a bit in converting to ICS
 V6.  I guess the question that I'm asking is how stable is the ICS V6
 distribution.  Do you feel that it's ready for production systems?

 Regards

 Erich


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


[twsocket] How to use THttpCli with threads?

2006-10-05 Thread Anatoly Podgoretsky
Hi!

I want use THttpCli within TTread, but when I close application it eception 
with AV at address 0
Code follow

constructor TBaseThread.Create;
begin
  inherited Create(False);
  FreeOnTerminate := True;
  HttpClient  := THttpCli.Create(nil);
{
  HttpClient.Agent  := 'Anatoly Podgoretsky NNTP Server';
  HttpClient.MultiThreaded  := True;
}
end;
//**
// разрушение базового потока
//**
destructor TBaseThread.Destroy;
begin
  HttpClient.Free;
  inherited;
end;

What I'm doing wrong?
Thread do nothing with main thread, this code only for testing. Real will 
written in future

With best regards,
Anatoly Podgoretsky


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

[twsocket] I'm writting a small C/S protocol

2006-10-05 Thread Francois PIETTE
In a message, Arno Garrels wrote:

 I'm writting a small C/S protocol. It includes sending/receiving
 database records. 

Maybe you are interested by MidWare ? Did you had a look at it ?

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
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] MD5 check needed ?

2006-10-05 Thread Wilfried Mestdagh
Hello Arno,

 So I will forget that and sleep well in the future, anyway it's much
 faster w/o a check, and I like it fast ;-) 

Yes you can sleep on both of your ears (Flemish proverb);

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

-- 
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] How to use THttpCli with threads?

2006-10-05 Thread Anatoly Podgoretsky
Hi all,

I carefully reread a FAQ and see other scenario.
Divide process into two pieces, download information from WEB site into main 
thread (ClientConnection) and run thread after data received only for database 
work.

My application is NNTP server with downloading information from one site, put 
it into database and news client get this information from database.

Client ask NNTP server for information, standard protocol. 
Server get request and ask information from database, then immediatelly reply 
to clent.
After it, server dynamically create some HttpCli and start downloading in 
asynchronous mode.
When In OnRequestDone server start a one or more individual threads only for 
heavy load database work. 
Thread do not cooperate with main thread, except OnTerminate Event.
During this operation client can ask other piece of information and this 
operation can start simultaneosy with paralel downloading a data and operating 
with database.

It is a right way? May be is other decision?

And now I have some questions:

1. What I set to property Multitreaded? I don't understand it.

2. Where and when I can destroy HttpCli
   a. In Event Handler OnRequestDone event, I think it's bad idea because it's 
a Event handler of HttpCli.
   b. I can send a user message itself, but how I can decide witch HttpCli I 
must destroy HttpCli.
   c. Destroy HttpCli on OnTerminate a thread.
   d. Destroy HttpCli on each Client request checking witch HttpCli is ready 
for destroy

3. In all examples I see that I must access HttpCli data with Memory Stream 
(ms.LoadFromStream(StringList) - is another method to access received data 
withou a stream? Directly. Like HttpCli.Get, HttpCli.Body.

I need your opinion about this scheme, how it right, another decision with 
simultaneously multi downloading from site and operate with received data with 
threads.

With best regards,
Anatoly Podgoretsky

- Original Message - 
From: Anatoly Podgoretsky [EMAIL PROTECTED]

 I want use THttpCli within TTread, but when I close application it eception 
 with AV at address 0
 Code follow
 
 constructor TBaseThread.Create;
 begin
  inherited Create(False);
  FreeOnTerminate := True;
  HttpClient  := THttpCli.Create(nil);
 {
  HttpClient.Agent  := 'Anatoly Podgoretsky NNTP Server';
  HttpClient.MultiThreaded  := True;
 }
 end;
 //**
 // разрушение базового потока
 //**
 destructor TBaseThread.Destroy;
 begin
  HttpClient.Free;
  inherited;
 end;
 
 What I'm doing wrong?
 Thread do nothing with main thread, this code only for testing. Real will 
 written in future
 
 With best regards,
 Anatoly Podgoretsky
-- 
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