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

iphone - Using nested NSDictionary with Picker -

javascript - Iterate over array and calculate average values of array-parts -

php - accessing mysql using different server to which db connection data is located -