Skip to content

Commit

Permalink
Pull up length
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1654320 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Jan 23, 2015
1 parent a5d96d7 commit db01a16
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions java/org/apache/tomcat/util/net/AprEndpoint.java
Expand Up @@ -1921,8 +1921,6 @@ public static class SendfileData extends SendfileDataBase {
// File
public long fd;
public long fdpool;
// Range information
public long length;
// Socket and socket pool
public long socket;
}
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/tomcat/util/net/Nio2Endpoint.java
Expand Up @@ -1617,7 +1617,6 @@ private void doRun() {
*/
public static class SendfileData extends SendfileDataBase {
public FileChannel fchannel;
public long length;
// Internal use only
private Nio2SocketWrapper socket;
private ByteBuffer buffer;
Expand Down
1 change: 0 additions & 1 deletion java/org/apache/tomcat/util/net/NioEndpoint.java
Expand Up @@ -1757,6 +1757,5 @@ private void doRun(SelectionKey key, NioSocketWrapper ka) {
*/
public static class SendfileData extends SendfileDataBase {
public volatile FileChannel fchannel;
public volatile long length;
}
}
7 changes: 7 additions & 0 deletions java/org/apache/tomcat/util/net/SendfileDataBase.java
Expand Up @@ -38,4 +38,11 @@ public abstract class SendfileDataBase {
* written.
*/
public long pos;

/**
* The number of bytes remaining to be written from the file (from the
* current {@link #pos}. This is initialised to the end point - the start
* point and then updated as the file is written.
*/
public long length;
}

0 comments on commit db01a16

Please sign in to comment.