• Post Reply Bookmark Topic Watch Topic
  • New Topic

Server - Client exchanging Message Objects

 
Tomer Gal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I'm writing a certain Server Client application and I'd like them to exchange messages by exchanging the following Message object :

import java.io.*;

public class Message implements Serializable {
String code;
String string;

String getCode() {
return ( code);
}
String getString() {
return ( string);
}

Message ( String code, String string ) {
this.code = code;
this.string = string;
}

public String toString() {
return( code + " - " + string );
}

}



Now my problem is that sending such an object will be large in size ( more than 10kb ).
What is the way to do it without it taking more than it should ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!