• Post Reply Bookmark Topic Watch Topic
  • New Topic

Send selective objects in a class over network  RSS feed

 
Richard Reavis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm working on a server program that will store a user object (username, password, etc.). This object will be saved to the server HD, but I also want to be able to send the object over the network to clients. However, I don't want to send the password hash to the clients. Is there a clever way of choosing which variables are included when serialized or sent over the network? I was thinking about externalizing the objects instead of serializing, but that would mean that the method of serializing the object would be identical for saving to the server HD and sending over the network to client. Thus, the password would be lost on the server on user load.

Thanks,
Richard D. Reavis
 
Pat Farrell
Rancher
Posts: 4686
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send messages, using text, do not send objects. Sending objects requires all sorts of operational and programming overhead.

Dealing with username/password is complex, and better suited for the Security section. I suggest you get the basic code working first, ignoring security, and then add the security.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!