Hi, all
I am recently working on a tiny program aimed to close the browser remotely.
The basic procedures are as follow:
Server side:
Your socket reading code is reading until EOF. you will not receive EOF until you close the socket. hence, your code never proceeds.
if you only want to send a single command on the socket connection, then close the OutputStream after writing the command (using Socket.shutdownOutput()
).
If you want to send multiple commands on a single socket connection, then you will need to come up with a way of delimiting each command (simple example here).