Skip to content

Commit

Permalink
cTCPLink: Added outgoing data size logging.
Browse files Browse the repository at this point in the history
This is only a test to try find the cause of #1720.
  • Loading branch information
madmaxoft committed Feb 7, 2015
1 parent 5ee5a69 commit 3ffa2fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/OSSupport/TCPLinkImpl.cpp
Expand Up @@ -7,6 +7,7 @@
#include "TCPLinkImpl.h"
#include "NetworkSingleton.h"
#include "ServerHandleImpl.h"
#include <event2/buffer.h>



Expand Down Expand Up @@ -121,6 +122,8 @@ void cTCPLinkImpl::Enable(cTCPLinkImplPtr a_Self)

bool cTCPLinkImpl::Send(const void * a_Data, size_t a_Length)
{
unsigned BytesPresent = static_cast<unsigned>(evbuffer_get_length(bufferevent_get_output(m_BufferEvent)));
LOGD("Writing %u bytes of data, there are already %u bytes queued", static_cast<unsigned>(a_Length), BytesPresent);
return (bufferevent_write(m_BufferEvent, a_Data, a_Length) == 0);
}

Expand Down

0 comments on commit 3ffa2fc

Please sign in to comment.