I have a device that tries to connect to a server periodically on a specific port (2001).
How do I establish a server in java that “waits” for this device to connect?
I have a device that tries to connect to a server periodically on a
Share
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.
This should be simple, standard use of Java sockets. Open a
ServerSocketon 2001, and call it’s.accept()method. It will wait until it receives a connection, then return a connectedSocketthat can be read from / written to.