summaryrefslogtreecommitdiff
path: root/src/SocketRecvBuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-18/+6
|
* Use user-defined literal for k, m, and g (powers of 1024)Tatsuhiro Tsujikawa2015-06-211-1/+3
|
* SocketRecvBuffer: Eliminate memmoveTatsuhiro Tsujikawa2015-04-141-17/+13
| | | | | | Since we don't try to read into buffer if buffer is not empty, we don't have to memmove things. This commit mostly rewrites SocketRecvBuffer.
* SocketRecvBuffer: Cleanup with C++11 featuresTatsuhiro Tsujikawa2014-06-051-3/+3
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-4/+5
|
* Rewritten PeerConnection::receiveMessage()Tatsuhiro Tsujikawa2012-06-251-0/+2
| | | | | | | The old implementation calls at least 2 read(2) (4bytes length and payload) to receive the message. This change will read as many bytes as possible in one read(2) call. BtPieceMessage::data_ is now just a const pointer to the internal buffer of PeerConnection.
* Eliminated SocketCore::peekData() from HttpServer.Tatsuhiro Tsujikawa2011-01-161-0/+5
|
* Eliminated SocketCore::peekData() form HTTP/FTP downloads.Tatsuhiro Tsujikawa2011-01-161-0/+86
We introduced SocketRecvBuffer which buffers received bytes. Since HTTP response header and response body are divided with \r\n, we have to buffer up several bytes to find this delimiter. We use SocketRecvBuffer to hold these bytes and only consumes header and passes SocketRecvBuffer, which may contain head of response body, to next Command. Since FTPConnection doesn't use SocketCore::peekData(), we left it as is.