java - Non-blocking write to a socket in Android -


i have android app has socket open. write socket without possibility of blocking thread on write noticeable amount of time. if io error occurs, write silently fail. there easy way this?

yes, nio provides socketchannel class (call getchannel method on socket), allows call configureblocking use non-blocking mode. should i/o through channel, , not through socket object.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -