Thanks everyone for your replies.  I now have my server working just great.
The solution was to move a set length of data to my output stream from the
input socket each time the OnDataAvailable event fired.

The result of this is that the OnDataAvailable event keeps firing until the
socket is empty.  When the socket has no more data I send the whole output
stream.  This differed from my original design which sent the output stream
every time data was received.

Its not totally foolproof I guess, but it works Okay.

re : defining packet sizes - I didn't control the client, so I couldn't
control what was being sent.  I had to intercept it and then send it on,
kind of like a proxy.
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to