[twsocket] Re: Application freezing when getting data

Raptor G g_ates@hotmail.com
Thu, 29 Jun 2000 10:30:29 EEST


Christoph,

You can find the server at http://www.fastream.com/FTPSERV.zip.

It is a read-only server with home directory selection.

For the client part, I cannot give all my code but if you tell me the part 
where you face problems, I can help. Actually for a noncommercial project 
like yours, it is very easy with ICS.

Regards,

RaptorG


From: "Christoph Purrucker" <gugi@bigfoot.de>
Reply-To: twsocket@elists.org
To: <twsocket@elists.org>
Subject: [twsocket] Re: Application freezing when getting data
Date: Wed, 28 Jun 2000 22:09:06 +0200

Hello everyone,

first thanks for your help, but I see I'm not as
good in English as I should be ;-) because of some
(for me) confusing facts in your answers:

1. to Raptor G:
 > As far as i could understand, all you need to
 > do is to first write the data
 > to a file on the disc and then use the FTP server
 > (the receiver computer)and
 > clients (the picture uploader). Together they can satisfy a 10mbit LAN. 
If
 > you decide to implement this and face problems please let me know. If you
 > want I can give you the address of my program which demonstrates
 > it all and
 > I can also send you the code section you want. Once you get the logic you
 > can transform it to Delphi. In my opinion, C++ and Object pascal are very
 > similar.
 > For small code snippets I can do the translation too. But I am not
 > an expert in Delphi.

I really don't want to set up ftp client/server (a lot of work :-)
But if you could send me your code it would be fine!



2. to Davie and others:
 > Although I AM A BIT SURPRISED that he encodeded the stuff into UUE.
 > It made me
 > smile when he said that, because it actually makes the files about
 > 50% BIGGER.
 > UUE BINHEX MIME and all the rest DO NOT make the files smaller.
 > They make them
 > bigger. They encode, NOT COMPRESS. So, now you say, geeez, why do that?
 > Well the
 > reason is they were developed for EMAIL systems that could ONLY
 > send and recieve
 > standard text characters. So, if you wanted to send a binary file,
 > you were screwed. So the UUE/MIME etc... were made so that these
 > binaries could be
 > converted to a bunch of standard text stuff and then on the recipent
 > end, they
 > could DE-code the stuff back to the original binary file.
 > THUS, EMAIL could
 > send/recieve binary files!!!

I know UUEncoding makes the data not smaller but 4/3 of the former size.
The problem was that I thought TWSocket can *only* transmit 7 Bit... :-(
I thought of compressing either, but don't implemented it yet.

The time for UUEncoding - sending - UUDecoding for ~40 KBytes was 10 sec
and for ~2 MBytes it was - as I said - about 5 Minutes... really bad - I
know.



3. to Stephen Williams:
 > How are you doing the actual send?  As one call to Send?  If so, then 
your
 > application is locked because it is busy copying 2MB of data to the
 > internal buffers of the TWSocket component which are then copied to the
 > Winsock buffers.

I sent every line came from the UUEncoder (~70 Bytes) line by line...

 > Break it into smaller chunks.  Say 4KB for example.

Ooops, I think I've too small chunks... :-(

 > I recently wrote a
 > TWSocket descendant that can send and/or receive a stream of any size in
 > user-definable chunks.  The test application never locked up during
 > the send or receive, even on very large files.
 > It can even send and receive different streams at the same time.

Could you please send me some code examples?

 > Even more bandwidth-efficient solution is to just send the painting
 > commands to the other application.  For example:

Also a Good idea! But in my app there are changed big parts of a photo.



4. to Rik Barker:
 > WSocket1.Send(ImageStream.Memory,ImageStream.size);
This is what I wanted to find... but how do I receive it?

cu cp



_______________________________________________
TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
Visit our website at http://www.rtfm.be/fpiette/indexuk.htm

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com