Android Question Synchronous HTTP or UDP

digimeter

New Member
Licensed User
Longtime User
Hello to all, I am so sorry I do not know if I am even posting this msg correctly, I need to ask how to delay/wait/pause or get a Synchronous call to obtain HTTP or UDP data. I am a very newbie ( only some weeks with b4a ) and have done wonders with an app to access some hardware modules that accept either HTTP or UDP requests and return ascii strings, I can get the data back just fine in either the jobdone or packet_received, but too late for my program flow ie i need to find a solution for something like

answer = UDPsend( xxxxx ) or HTTP( xxxxx )

now do some processing of the answer BEFORE moving on to the next line of code

I have searched the forums for some 2 weeks + now and have seen that delays are not possible, well not over 5 seconds, but would be happy if after 1 second of no data available then accept a fail and move on so maybe a sub something like:

answer = UDPsend( xxxxx, delyupto1secmax ) or HTTP( xxxxx, delyupto1secmax )

would solve the problem.

As I feel that there maybe no solution I fear this maybe my last forum access an must move over to a windows tablet and do my own delay so may I say to ALL of you on this forum what a delight and how helpful you are to all levels of users, and finally Erel, you are truly the ultimate, quite frankly words escape me to praise your immense talent, a true software magician.

Kindest regards to all you guys, assuming I have managed to get this msg posted.
 
Top