Yes TCP can handle large data streams but Microsofts implementation of
sockets when using non-blocking sockets requires that the data stream be
buffered before sending which then notifies the implementor of success or
failure.  Have you been able to stream a small image?

-----Original Message-----
From: David O'Brien [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 17, 2000 3:44 PM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: TServerSocket


It's a non-blocking socket. 
If I set it to blocking then the OnClientRead Event never Fires.
As I.E.5.5 is the client, I have no idea how the client would deal with a
split stream.
I tried breaking it up using a buffer(10240), then streaming the buffer
until the original had been dealt with.
As soon as I modify the original TFileStream at all, I.E. gets nothing back.
(Not even the size of the image)

I thought that TCP was able to handle the splitting and putting back
togeather of large chunks of data automatically.

Dave.

-----Original Message-----
From: Tony Sinclair [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 October 2000 14:32
To: Multiple recipients of list delphi
Subject: RE: [DUG]: TServerSocket


Hi David,

are you using server type as non-blocking or thread blocking?  If it's a non
blocking execution, then the incomming buffer is handled by Winsock further
on down in the API until you retrieve it out of the buffer.  I can't
remember exactly the size of that buffer but that number doesn't seem to far
wrong so anything after that would be dropped after the buffer filled up.
How are you breaking it up?  You will probably need to have an send / ack
procedure and stitch together the packets.

-----Original Message-----
From: David O'Brien [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 16, 2000 5:18 PM
To: Multiple recipients of list delphi
Subject: [DUG]: TServerSocket


I have a little app which is supposed to feed an image to a browser.
The image is on disk, the browser connects through a TServerSocket.

<img src="http://150.1.1.43:16384">

MyStream := TFileStream.Create(FileName, 0) ;
Socket.SendStream(MyStream) ;

This all works fine until the image gets to a certain size.
The Image on disk is fine, the streamed image gets truncated after about
10240 bytes.

I have tried to break the stream up and send it in small chunks, but then
the browser seems to get nothing.

Any ideas how I am supposed to be doing this?

Dave.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to