mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-08 22:57:52 +00:00
send buffer offset
This commit is contained in:
parent
b6e0fdf920
commit
e866243097
@ -545,9 +545,9 @@ namespace util
|
|||||||
{
|
{
|
||||||
std::string content ("");
|
std::string content ("");
|
||||||
content += "<html>" + HTTPConnection::itoopieImage + "</html>";
|
content += "<html>" + HTTPConnection::itoopieImage + "</html>";
|
||||||
std::string response ("HTTP/1.0 200 OK\r\n\r\n");
|
std::string response ("HTTP/1.0 200 OK\r\n");
|
||||||
response += "Content-Length: " + boost::lexical_cast<std::string>(content.length()) + "\r\n";
|
response += "Content-Length: " + boost::lexical_cast<std::string>(content.length()) + "\r\n";
|
||||||
response += "Content-Type: text/html\r\n";
|
response += "Content-Type: text/html\r\n\r\n";
|
||||||
response += content;
|
response += content;
|
||||||
m_Stream->Send ((uint8_t *)response.c_str (), response.length (), 30);
|
m_Stream->Send ((uint8_t *)response.c_str (), response.length (), 30);
|
||||||
m_Stream->Close ();
|
m_Stream->Close ();
|
||||||
|
@ -243,6 +243,7 @@ namespace stream
|
|||||||
size_t sentLen = STREAMING_MTU - size;
|
size_t sentLen = STREAMING_MTU - size;
|
||||||
if (len < sentLen) sentLen = len;
|
if (len < sentLen) sentLen = len;
|
||||||
memcpy (packet + size, buf, sentLen);
|
memcpy (packet + size, buf, sentLen);
|
||||||
|
buf += sentLen;
|
||||||
len -= sentLen;
|
len -= sentLen;
|
||||||
size += sentLen; // payload
|
size += sentLen; // payload
|
||||||
m_LocalDestination->Sign (packet, size, signature);
|
m_LocalDestination->Sign (packet, size, signature);
|
||||||
@ -257,6 +258,7 @@ namespace stream
|
|||||||
size_t sentLen = STREAMING_MTU - size;
|
size_t sentLen = STREAMING_MTU - size;
|
||||||
if (len < sentLen) sentLen = len;
|
if (len < sentLen) sentLen = len;
|
||||||
memcpy (packet + size, buf, sentLen);
|
memcpy (packet + size, buf, sentLen);
|
||||||
|
buf += sentLen;
|
||||||
len -= sentLen;
|
len -= sentLen;
|
||||||
size += sentLen; // payload
|
size += sentLen; // payload
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user