Files
Sourcetrail/src/app/qt/network/QtIDECommunicationController.cpp
T
Manuel Dobusch fbc5f7a7fe logic: network port option
Added options to Coati and VS plugin to set network ports
2015-11-18 17:08:05 +01:00

23 lines
785 B
C++

#include "QtIDECommunicationController.h"
#include <functional>
QtIDECommunicationController::QtIDECommunicationController(QObject* parent, StorageAccess* storageAccess)
: IDECommunicationController(storageAccess)
, m_tcpWrapper(parent)
{
ApplicationSettings* appSettings = ApplicationSettings::getInstance().get();
m_tcpWrapper.setReadCallback(std::bind(&QtIDECommunicationController::handleIncomingMessage, this, std::placeholders::_1));
m_tcpWrapper.setServerPort(appSettings->getCoatiPort());
m_tcpWrapper.setClientPort(appSettings->getPluginPort());
m_tcpWrapper.startListening();
}
QtIDECommunicationController::~QtIDECommunicationController()
{}
void QtIDECommunicationController::sendMessage(const std::string& message) const
{
m_tcpWrapper.sendMessage(message);
}