• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI

 
Alexander Ahammer
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How ca I send a message from a client to server.I know that i must use a Interface that calls up the method, but how must this method look like if i want to send a message and my Computer network (localhost) identification. The Server should be capable of putting the message together with my identification in a Hashtable. I should then be able to read my message .
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a quick example program that saves a message based on the IP address of the client... like any RMI program, you need three parts, the server interface, the server implementation, and a client.

Here is the server interface :


Here is the Server implementation :


And here's the client :


Hope it helps...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!