Added options to server application and did some stuff for the application
This commit is contained in:
42
FlippR-Driver/networking/input/InputSocketHandler.h
Normal file
42
FlippR-Driver/networking/input/InputSocketHandler.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* SocketConnection.h
|
||||
*
|
||||
* Created on: Jun 13, 2018
|
||||
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert
|
||||
*/
|
||||
|
||||
#ifndef FLIPPR_CODE_INPUTSOCKETCONNECTION_H
|
||||
#define FLIPPR_CODE_INPUTSOCKETCONNECTION_H
|
||||
|
||||
|
||||
#include <Poco/Net/TCPServerConnection.h>
|
||||
|
||||
#include "input/InputDriver.h"
|
||||
#include "input/EventHandler.h"
|
||||
#include "input/Event.h"
|
||||
#include "utility/IBlockingQueue.h"
|
||||
|
||||
namespace flippR_driver
|
||||
{
|
||||
namespace networking
|
||||
{
|
||||
namespace input
|
||||
{
|
||||
|
||||
class InputSocketHandler : public Poco::Net::TCPServerConnection, flippR_driver::input::EventHandler
|
||||
{
|
||||
public:
|
||||
InputSocketHandler(Poco::Net::StreamSocket streamSocket, std::shared_ptr<flippR_driver::input::InputDriver> input_driver);
|
||||
|
||||
void run() override;
|
||||
void handle(flippR_driver::input::Event &event) override;
|
||||
|
||||
private:
|
||||
utility::IBlockingQueue<flippR_driver::input::Event>* queue;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif //FLIPPR_CODE_INPUTSOCKETCONNECTION_H
|
||||
Reference in New Issue
Block a user