dword CConsoleMenuItem::GetTitleSize() const { CStringBuffer tmp; tmp = CreateMenuTitle(); return tmp.GetLength(); }
static void TestTCPClientKeepAlive_SendData(CTcpClient& tcpClient, const CStringBuffer& buffer) { CStringBuffer sBuffer; CByteBuffer bBuffer; dword numBytesSend; sBuffer.FormatString(__FILE__LINE__ _T("##%05d## %s"), buffer.GetLength(), buffer.GetString()); sBuffer.convertToByteBuffer(bBuffer); tcpClient.SendData(bBuffer.get_Buffer(), bBuffer.get_BufferSize(), &numBytesSend); assert(numBytesSend == bBuffer.get_BufferSize()); }
void SendData(CTcpClient* tcpClient, const CStringBuffer& buffer) { CScopedLock _lock; CStringBuffer sBuffer; CByteBuffer bBuffer; dword numBytesSend; sBuffer.FormatString(__FILE__LINE__ _T("##%05d## %s"), buffer.GetLength(), buffer.GetString()); sBuffer.convertToByteBuffer(bBuffer); _lock.unlock(); tcpClient->SendData(bBuffer.get_Buffer(), bBuffer.get_BufferSize(), &numBytesSend); assert(numBytesSend == bBuffer.get_BufferSize()); }