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

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -