I have a client-server program in java.. I need to handle in 2 scenarios:
The client send messages to the server and the server processes the message and return the result. (this works fine)
When something happens at the server I need to send the data to the client to process it.
To be more specific on the second scenario, I'm trying to develop an android app, so when I'm getting a text messages (SMS) it sends to my PC the sender data and the message body. I'm doing this by using the WIFI network (just for fun :) )
Any ideas? I thought about to have a thread in my client side (PC) to listen the server messages.. but I don't think its a good solution..