Assume you have a running jar file that is connected to Mysql and keep the connection.
I have a function (delete a record) in my jar file that deletes a user with PID.
Now, I need to send the argument to the jar file without reopening the jar file.
In Linux, We send a pulse to process
How do can I send an argument or request to process without reopening it?
Thanks
I would use UDPSocket for this. It is stateless and quite simple to implement. You can then have another program that sends the command to the main program.
I would use UDPSocket for this. It is stateless and quite simple to implement. You can then have another program that sends the command to the main program.
TCP - server listens to incoming connections -> client connects to server -> communication is done between two sockets -> at some point the connection breaks and client needs to connect again.
There is a complex network state that needs to be managed.
UDP - server listens to incoming data -> client sends data.
No state to manage.
Like multiplayer games sending positions, etc. to players. You don't need to know the ip address of the receiver. It's like a broadcast. You may encrypt it if security is a must.