LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-04-2004, 01:09 PM   #1
djgerbavore
Member
 
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 443

Rep: Reputation: 30
sending Objects from Server to Client


I'm writing a program that involves sending objects from server to client, via sockets.

I looked at the Java's API, but was unsuccessful. It only tells him how to do it from a file.
here is what i have so far

Code:
//server side
ObjectOutputStream oStream = new ObjectOutputStream(
                   new BufferedOutputStream( 
                             newSocket.getOutputStream()));
System.out.println("Testing1");
ObjectInputStream istream = new ObjectInputStream(
                    new BufferedInputStream(
                            newSocket.getInputStream()));
System.out.println("Testing2");  

//client side
 ObjectInputStream istream = new ObjectInputStream(
           new BufferedInputStream(
                   connection.getInputStream()));
System.out.println("testing1");
ObjectOutputStream ostream = new ObjectOutputStream(
                new BufferedOutputStream(
                          connection.getOutputStream()));
System.out.println("testing2");
The server freezes after the printing out the Testing1 statement..

thanks

Last edited by djgerbavore; 10-04-2004 at 01:44 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lynx browser, alternate mail client for sending comments to website authors SharpyWarpy Linux - Software 2 08-04-2005 11:21 AM
Sending message from server to client paulwong Linux - Networking 6 07-22-2005 10:55 AM
can not connect to my pureftp server from Linux client, but i can from windows client bonito Suse/Novell 5 03-16-2005 10:45 PM
mod_perl and sending files to the client devinWhalen Linux - Software 0 05-18-2004 12:27 PM
Refresh client user list at autentication client/server network. robertoneto123 Linux - Networking 0 11-11-2003 11:38 AM


All times are GMT -5. The time now is 05:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration