nttpd: allow sendfile() to cope with files >= 2GB; introduce range support

(This re-applies most of the patches I've reverted about two hours ago.)


Origin commit data
------------------
Branch: ni/coolstream
Commit: ff46970457
Author: martii <m4rtii@gmx.de>
Date: 2014-07-20 (Sun, 20 Jul 2014)



------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-07-20 19:00:16 +02:00
committed by [CST] Focus
parent 56f7daa01a
commit 9e2ad55568
13 changed files with 92 additions and 50 deletions

View File

@@ -71,7 +71,7 @@ public:
bool CheckSocketOpen(); // check if socket was closed by client
// send & receive
int SendFile(int filed); // Send a File
bool SendFile(int filed, off_t start = 0, off_t size = -1); // Send a File
std::string ReceiveBlock(); // receive a Block. Look at length
unsigned int ReceiveFileGivenLength(int filed, unsigned int _length); // Receive File of given length
std::string ReceiveLine(); // receive until "\n"