Hi,
I am new to Java. Please help me to do the following:
I have a instance of a class say 'mesg'
and I have two members in it which I have assigned
some values. Now I want to send 'mesg' over a socket
to the server, how do I accomplish this. I tried in
java documentation and could find only how to write
short,int,long etc. to the socket but nothing describes
which helps me my case of sending mixed/composite data
over a socket.
Plus do I have to do convert it using something like
htons() before I send it. I am talking to a C server.
If yes, what is the similar call in Java to do that?
I really appreciate your help.
Thanks
-Manoj