Eile Mit Weile
Loading...
Searching...
No Matches
ResponseListenerThread Class Reference

Thread that listens for responses from the server. More...

#include <ResponseListenerThread.hpp>

Inheritance diagram for ResponseListenerThread:

Public Member Functions

 ResponseListenerThread (sockpp::tcp_connector *connection)
 
 ~ResponseListenerThread ()
 

Protected Member Functions

virtual ExitCode Entry ()
 

Private Member Functions

void OutputError (std::string title, std::string message)
 

Private Attributes

sockpp::tcp_connector_connection
 

Detailed Description

Thread that listens for responses from the server.

This class is derived from wxThread, which is wxWidgets' thread class. It is responsible for listening for responses from the server and calling ClientNetworkManager::ParseResponse on the received messages.

Constructor & Destructor Documentation

◆ ResponseListenerThread()

ResponseListenerThread::ResponseListenerThread ( sockpp::tcp_connector connection)

Initializes the ResponseListenerThread with the given connection.

◆ ~ResponseListenerThread()

ResponseListenerThread::~ResponseListenerThread ( )

shuts down the _connection.

Member Function Documentation

◆ Entry()

wxThread::ExitCode ResponseListenerThread::Entry ( )
protectedvirtual

The main method of the thread. It listens for responses from the server and calls ClientNetworkManager::ParseResponse on the received messages.

◆ OutputError()

void ResponseListenerThread::OutputError ( std::string  title,
std::string  message 
)
private

Outputs the given error message to the user. See GameController::ShowError.

Member Data Documentation

◆ _connection

sockpp::tcp_connector* ResponseListenerThread::_connection
private

The tcp connection to the server.


The documentation for this class was generated from the following files: