httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lee Fellows <lfell...@4lane.com>
Subject Re: java.net.SocketException: socket write error (code=10053) onapache
Date Tue, 11 Jun 2002 13:37:14 GMT
I am glad it works, but still puzzled how Apache is involved.  As to the
'way' Apache handles output streams, as relates to your program, it does
not. Your code opens, closes, and in all ways controls any stream it
uses.  Apache plays no part in it.


On Tue, 2002-06-11 at 09:07, Neeraja Divakaruni wrote:
> I tried this with client and server. My concern is whether this error anyway
> related to the way Apache handles the output streams.
> because I saw in one site that socket outputstream it indirectly calls a
> JservOutputStream class to handle this part.
> So am  wondering if this anyway related to Apache. But the code change made made
> a  difference.
> Thanks
> Neeraja
> 
> Lee Fellows wrote:
> 
> > Have you tried writing the server and client(?) as seperate applications
> > and tested their functionality?  I don't see how the 'change' you list
> > would effect anything, but I have not dug into the specs.  As to its
> > relevence to Apache, how is this in any manner connected to Apache?
> >
> > On Tue, 2002-06-11 at 08:05, Neeraja Divakaruni wrote:
> > >
> > > Hi,
> > >
> > > we have the following code in our application and it fails with
> > > "java.net.SocketException: socket write error (code=10053)"  error when DATA
> > > STRING which is the data to be written onto the socket exceeds 20 MB (to be
> > > generic with large amounts of data)
> > >
> > >
> > > socket = getConn(url.getHost(), url.getPort());
> > >
> > > StringReader stringreader = new StringReader(DATA STRING);
> > > OutputStreamWriter outputstreamwriter = new
> > > OutputStreamWriter(socket.getOutputStream());
> > > int i = 0;
> > > int j = SystemProperties.SIZE_READBUF;
> > > char ac[] = new char[j];
> > > int k;
> > > while(m_run && (k = stringreader.read(ac, 0, j)) > 0)
> > > {
> > > outputstreamwriter.write(ac, 0, k);
> > > outputstreamwriter.flush();
> > > i += k;
> > > }
> > >
> > > How ever if we establish the socket connection after reading the data into
> > > the StringReader i.e with the following modification it works.
> > >
> > >
> > > StringReader stringreader = new StringReader(DATA STRING);
> > > socket = getConn(url.getHost(), url.getPort());
> > > OutputStreamWriter outputstreamwriter = new
> > > OutputStreamWriter(socket.getOutputStream());
> > > int i = 0;
> > > int j = SystemProperties.SIZE_READBUF;
> > > char ac[] = new char[j];
> > > int k;
> > > while(m_run && (k = stringreader.read(ac, 0, j)) > 0)
> > > {
> > > outputstreamwriter.write(ac, 0, k);
> > > outputstreamwriter.flush();
> > > i += k;
> > > }
> > >
> > > What can be the reason for this. .Is it the limitation with apache or it is
> > > some version related.Is there any way we can avoid this using some methods.
> > > can any of you help me in identifying the issue.
> > >
> > > Thanks
> > > Neeraja
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message