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!

Socket Read - Best way to do

843790Feb 4 2008 — edited Feb 5 2008
Hi All,

I need ur suggestion to find a best way to read socket.

Take this scenario. I have a standard TCP IP buffer size. I cannot alter the buffer size. I have n number of process to write data into a socket. I have a process to read from that socket. Problem is the rate at wich the process writes is greater than the rate at wich the process reads.

So i am getting broken pipe some times.

The socket reader process has 2 threads one to read and one to process. The read thread just read data from it and store it in a buffer. The process thread reads the buffer and process it.

So want to fine tune this.

How can i do that?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2008
Added on Feb 4 2008
4 comments
178 views