/*********************************************************************

Name:		Raytracer
Author:		Kamil Szatkowski "Netrix" (C)
Website:	http://www.netrix.org.pl/
License:	GNU GPL

*********************************************************************/
#pragma once
#include "RSICommon.hpp"
#include "RayTracer.hpp"

class RSIServer
{
public:
	void init(RaytracerParameters& RTParams, SocketClient& socketClient);

	bool run(Task& task);

	void done();

private:
	bool getResponse();

	void clientRequest();

	void clientReady();

	void clientTask(Task& task);

	void clientResult(Task& task);

private:
	RaytracerParameters* m_pRTParams;
	SocketClient* m_pClient;
	NIne::NUint32 m_uServerState;
};