hqt
hqt

Reputation: 30284

How to make server automatically send data back to connected client

I'm using Java RMI for networking programming between client and server. Client connects to server, invoke method and receive is easily solved by RMI Technology. But now I have this problem : the server will remember that registered client, and at sometime, server will return data back to that client by method A.

So my questions are:

Upvotes: 1

Views: 660

Answers (1)

Chase
Chase

Reputation: 3183

Option 1) Make a UnicastRemoteObject on the client and send it to the server. (server-push)

Option 2) Have the server store the data and have the client call a method to pick it up at regular intervals. (client-polling)

Upvotes: 2

Related Questions