Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Francois Piette
> I expect to get a data record of N byte length. I'd like to wait > until the whole record has been received then I can call Receive() > to read it back. Otherwise, if a OnDataAvailable() is triggered > before the whole record is received, I will have to temporarily > store it somewhere and concat

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Jack
Hello Arno, I expect to get a data record of N byte length. I'd like to wait until the whole record has been received then I can call Receive() to read it back. Otherwise, if a OnDataAvailable() is triggered before the whole record is received, I will have to temporarily store it somewhere and con

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Arno Garrels
Francois PIETTE wrote: >>> I know I know :) I was trying to ask if I can get that info >>> without calling Receive() and ReceiveStr() :) >> >> var >>Count : Integer; >> >> WSocket_ioctlsocket(WSocket1.HSocket, FIONREAD, Count); > > There is an article on MSDN which says this function is not

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Francois PIETTE
>> I know I know :) I was trying to ask if I can get that info >> without calling Receive() and ReceiveStr() :) > > var >Count : Integer; > > WSocket_ioctlsocket(WSocket1.HSocket, FIONREAD, Count); There is an article on MSDN which says this function is not reliable (http://support.microsoft.

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Arno Garrels
Jack wrote: > I know I know :) I was trying to ask if I can get that info > without calling Receive() and ReceiveStr() :) var Count : Integer; WSocket_ioctlsocket(WSocket1.HSocket, FIONREAD, Count); Note that calling the function will trigger OnDataAvailable if there is data available. ---

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Fastream Technologies
Sorry. That is something I do not know :). On 10/24/06, Jack <[EMAIL PROTECTED]> wrote: > I know I know :) I was trying to ask if I can get that info > without calling Receive() and ReceiveStr() :) > > -- > Best regards, > Jack > > Tuesday, October 24, 2006, 12:37:37 AM, you wrote: > > > Receive()

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Jack
I know I know :) I was trying to ask if I can get that info without calling Receive() and ReceiveStr() :) -- Best regards, Jack Tuesday, October 24, 2006, 12:37:37 AM, you wrote: > Receive() and ReceiveStr() that you would normally be calling in > OnDataAvailable returns the number of bytes. >

Re: [twsocket] A question about OnDataAvailable

2006-10-24 Thread Fastream Technologies
Receive() and ReceiveStr() that you would normally be calling in OnDataAvailable returns the number of bytes. Best Regards, SZ On 10/24/06, Jack <[EMAIL PROTECTED]> wrote: > Hi all, > > Is there a way to know how many bytes of data is available > in the OnDataAvailable handler? > > -- > Best reg