- I would like to send/receive sqlite database files (*.db) in byte[] over TCP socket connection?
- Is there a similar method in Java/Android for Socket.Poll() C#?
I’m new in Java / Android
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the Socket class.
There is no
Pollmethod, however there are other methods that can be used to check the socket status.For example, you can use
Socket.isOutputShutdown()to check if the output stream is available (Whether it has been shutdown or not), and you can useSocket.getInputStream().available()to get the number of bytes available to read now.