Android Question Asyncstreams delays over 3G.

tigrot

Well-Known Member
Licensed User
Longtime User
Hi everybody,
I'm getting long delays in transmitting a 4096 bytes buffer via Asyncstreams connected to a Socket. Via 3G network the packet is delivered in 4 to 7 seconds, but via WIFI the delay is only a fraction of second. 4G is much smaller. HDSPA is only a small gain...
I've built a server and a client to test this issue, so I'm sure about it. A small buffer like 100bytes gets no delay.
I'd like to send small packets of data, but I don't see any FLUSH instruction to inform the stream to start flushing the buffered output.
I send the 4Kb of data in four chunks 1Kb each, but the driver seems to keep them and send all together! This is not abnormal, but it's not what I want.
Any idea?

Ciao a tutti
Mauro
 

tigrot

Well-Known Member
Licensed User
Longtime User
Hi Erel,
OutputStream did the trick. I reduced delay to about 3 sec. from 7. In have handled input using asyncStream and output with OutputStream and seems to work(don't ask me why).
Now I'm writing a library wrapping Lame. I have already built .SO on Lame package and have to build the wrapper. I don't have much experience in OOP (I was born with batch processing and procedural languages), and Java is a little alien to me!
Thank you for support, I'll inform the other guys on forum about my experiences.
Happy WE!
Mauro
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…