feat: add some info and app logging messages
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include <Windows.h>
|
||||
#include "NamedPipe.h"
|
||||
#include "../Common/Common.h"
|
||||
#include "Domain/Services/ServiceLocator.h"
|
||||
|
||||
using namespace L2Bot::Domain;
|
||||
|
||||
@@ -11,26 +12,24 @@ class NamedPipeTransport : public Transports::TransportInterface
|
||||
public:
|
||||
const bool Connect() override
|
||||
{
|
||||
OutputDebugStringW(m_PipeName.c_str());
|
||||
if (!m_ConnectionPipe.Connect(m_PipeName))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
OutputDebugStringA("Client connected to connection pipe");
|
||||
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"client connected to the connection pipe ""{}""", m_PipeName);
|
||||
|
||||
const auto mainPipeName = GenerateUUID();
|
||||
|
||||
m_ConnectionPipe.Send(mainPipeName);
|
||||
|
||||
OutputDebugStringA("Name of main pipe sended");
|
||||
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"name ""{}"" of the main pipe sended", mainPipeName);
|
||||
|
||||
if (!m_Pipe.Connect(mainPipeName))
|
||||
{
|
||||
OutputDebugStringA(std::to_string(GetLastError()).c_str());
|
||||
return false;
|
||||
}
|
||||
OutputDebugStringA("Client connected to main pipe");
|
||||
Services::ServiceLocator::GetInstance().GetLogger()->Info(L"client connected to the main pipe ""{}""", mainPipeName);
|
||||
|
||||
m_Pipe.Send(L"Hello!");
|
||||
|
||||
|
Reference in New Issue
Block a user