|
-
Aug 10th, 2003, 07:26 AM
#1
Thread Starter
New Member
Send class with client-server
Hi all,
I am working on server-client project. I found a simple example where you send string like this:
output = new PrintWriter(socket.getOutputStream(),true);
output.println(lineToBeSent);
and receive:
input = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String message = input.readLine();
my question is how can I send and receive a class if the class is the same in both server and client?
-
Aug 13th, 2003, 01:55 AM
#2
I recommend serialization. Object(In/Out)putStream
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|