Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Client/server application (Help me)

843790Jun 14 2007 — edited Jun 18 2007
I have a client server application.In the client part i send data to the server and the server receive data. After receiveing data server also send some data but the client can't capture data. Anyone please tell me what is the problem?

I am giving the sample code here......
I am thinking actually the problem is in the client side.......
----------------------------------------------------------------------------------
Server
---------------------------------------------------------------------------------
out = new DataOutputStream(client.getOutputStream());
input = this.client.getInputStream();


byte[] data=new byte[input.available()];
input.read(data);

byte[] sdata=new byte[3];
sdata[0]=1;
sdata[1]=2;
sdata[2]=3;
out.write(sdata);

--------------------------------------------------------------------------------------
Client
--------------------------------------------------------------------------------------

How can i implement my client to send and receive at a time??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2007
Added on Jun 14 2007
9 comments
209 views