#ifndef TPLAYERSERVER_H
#define TPLAYERSERVER_H

#include "CSocket.h"

class TServerList;
class TServerSocket : public CSocketStub
{
	public:
		// Constructor
		TServerSocket(TServerList *pServerList = 0);

		// Functions -> Socket
		bool onRecv();
		bool onSend()				{ return true; }
		bool canRecv()				{ return true; }
		bool canSend()				{ return false; }
		bool onRegister()			{ return true; }
		void onUnregister()			{ return; }
		SOCKET getSocketHandle()	{ return mSocket.getHandle(); }

		int initiate(const char *pPort, const char *pDescription, int pSocketType = 0);

	protected:
		CSocket mSocket;
		int mSocketType;
		TServerList *mServerList;
};

#endif
