i use async stream and the New_data event.
in my main i must wait for the response from the network.
And the AStreams_NewData event is not fired
what can i do ?
code :
dim weiter as boolean
Sub AStreams_NewData (Buffer() As Byte)
weiter = true
end sub
Well, I don't.
I think your problem is that the newData event is not fired and you do want it to fire, but the cause for this is in your connection or data transfer.
The idea of Astream is that it knows when there is data ready and then the event is launched. You can run the sub manually but in that case you don't have the data ready and that is not a good idea.
The loop is not necessary !
Derez is absolutely right.
If you need that your server sends some sort of 'welcome' message, then this would be there in your aStreams_newData.
But... what is the response you are waiting for? How are you connecting to your server?