Improvements for #297104.
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1516 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
fcbb889641
commit
a51b1a217c
|
@ -334,6 +334,19 @@ public class ProxyHandler extends AbstractHandler
|
|||
proxyToServer.waitReady(_connectTimeout);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Reads (with non-blocking semantic) into the given {@code buffer} from the given {@code endPoint}.</p>
|
||||
* @param endPoint the endPoint to read from
|
||||
* @param buffer the buffer to read data into
|
||||
* @return the number of bytes read (possibly 0 since the read is non-blocking)
|
||||
* or -1 if the channel has been closed remotely
|
||||
* @throws IOException if the endPoint cannot be read
|
||||
*/
|
||||
protected int read(EndPoint endPoint, Buffer buffer) throws IOException
|
||||
{
|
||||
return endPoint.fill(buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Writes (with blocking semantic) the given buffer of data onto the given endPoint.</p>
|
||||
*
|
||||
|
@ -451,7 +464,7 @@ public class ProxyHandler extends AbstractHandler
|
|||
|
||||
while (true)
|
||||
{
|
||||
int read = _endPoint.fill(_buffer);
|
||||
int read = read(_endPoint, _buffer);
|
||||
|
||||
if (read == -1)
|
||||
{
|
||||
|
@ -551,7 +564,7 @@ public class ProxyHandler extends AbstractHandler
|
|||
|
||||
while (true)
|
||||
{
|
||||
int read = _endPoint.fill(_buffer);
|
||||
int read = read(_endPoint, _buffer);
|
||||
|
||||
if (read == -1)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue