Perry Smith

Java Questions & Answers

Home / Java Q & A Page 2 / Java Q & A Archive Main Page

Networking
Monday, 09-Nov-98 04:41:28
202.141.24.2 writes:

I hava two programs,one a client program and another a server program.The client program requests the server to send the contents of a file,residing in the server.The client passes the name of the file.I want the server to send the file to the client and also to show on the server screen.The server program is printing the contents of the file on the screen completely but it is not able to send the file completely on the network.What could be the problem? The logic I use is create a buffer of size equal to the size of the file ,store the contents of the file in the buffer and send it both to the screen and the network (that is to the client)

Thanks in advance

Vidya Shankar


Responses
Re: Networking
Thursday, 12-Nov-98 23:27:15
155.69.4.53 writes:

I'm not sure if i'm right. I thought that when data is sent through the network, it include control informations for synchronization and other purposes. These control info took up some of the buffer space. May be that why the client couldn't receive the full file. Try increasing the buffer size.

Raymond Leong


Home / Java Q & A Page 2 / Java Q & A Archive Main Page