java - How can i check if there is incoming data from a TCP Socket without receiving it? -
basically need notification, proceed receive data using class datainputstream , method read().
the problem datainputstream not have method check if there read , doing tests read() method interfere further calls read().
i can hack make test reading 1 byte , append further data it, see if there more elegant solution.
datainputstream
not have method check if there read
yes does. missed available()
method, doesn't return non-zero, depending on you're connected to.
have @ pushbackinputstream
.
Comments
Post a Comment