Hello!
> Have a look at TTWSChatForm.CliWSocketDataAvailable in TWSChat1.pas
> source
> file. There is a RcvBuf which is a stically allocated array of char (you
> can
> make it dynamically allocated) where data is received and the end of what
> has already been received. RcvLen variable keep trac
Hello David,
> for the "ptrTemp". (1) What is the best number , i.e. a number
> that gaurentee it is not to o small, while not occupying too much
> memory?
8 KB is a good size if you have a fast network.
> have ptrTemp as a fixed size buffer determined at design time, and have
> it locally i
I got it. so this is what I'll do:
A> txt 10240
B> (malloc ptrAltogether 10240 bytes; Let sizeRemain = 10240;sizeDone=0)
sendtxt
A> "010010101010101..."
B> (First packet is ready:
var ptrTemp: array[0..MAX_PACK] of char;
Zero(ptrTemp);
if(sizeThisPack = Receive(ptrTemp) > 0)
Hello David,
> So I ignored the zero und -1 returned by the Receive(), and it worked :)
Great ! I'm glad it works for you :)
> But the "TempSize" in my code was never changed. it was set as to a
> constant value en the constructor.
Ok no problem then. But if your buffer has a constant size, t
essMessages;
>>ZeroMemory(@chrReceived, sizeof(chrReceived));
>>bytesReceived := Self.Receive(@chrReceived,
>>sizeof(chrReceived));
>>ReceiveLine := WideString(chrReceived);
>> bytesReceived := by
P transmission. You
>>have such "packet reassembly" in almost all ICS components. TWSocket itself
>>has a LineMode that does this reassembly for lines. Lines are not necessary
>>text line. It is just a convenient name to specify any variable length data
>>with end of dat
.be
- Original Message -
From: "Kei" <[EMAIL PROTECTED]>
To: "ICS support mailing"
Sent: Tuesday, November 01, 2005 10:32 AM
Subject: Re: [twsocket] transmission stress test
> I'm Sorry! I thought the code was too big to attach.. anyway here it is
> My
Hello David,
I suggest to first see if the sender or the receiver fails. you can easy
do that if you hang SocketSpy (user made) between them.
> Line 4117: Received -1 bytes, Remaining 3123 bytes
> Line 4118: WARNING! Transfer went wrong! Error 0
No nothing went nececary wrong. Ignore 0 and -1, j
a clue what's going wrong here?
>>
>>
>
>How would you receive help when we don't know anything about your code !
>It is likely that the problem is at the receiving part.
>
>--
>Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>--
>[
PROTECTED]>
To: "ICS support mailing"
Sent: Tuesday, November 01, 2005 9:45 AM
Subject: [twsocket] transmission stress test
> Hi, this is David.
>
> I asked about a method to recognize the "splitted packets" and to join
> them upon arrival of the last one. S
Hi, this is David.
I asked about a method to recognize the "splitted packets" and to join
them upon arrival of the last one. So far my protocol works fine, and
all the data is assembled in an orderly manner. For large texts or
binary data, the clients knows how to handle it as follows:
The "Red
11 matches
Mail list logo