#pragma once
#include "ModuleHook.h"
#include "NetworkUnmanaged.h"
namespace NosSmoothCore
{
	public ref class Network
	{
	public:
		Network(NosSmoothCore::ModuleHook moduleHook);
		/// 
		/// Send the given packet to the server.
		/// 
		/// The packed to send.
		void SendPacket(System::String^ packet);
		
		/// 
		/// Receive the given packet on the client.
		/// 
		/// The packet to receive.
		void ReceivePacket(System::String^ packet);
		/// 
		/// Sets the receive callback delegate to be called when packet is received.
		/// 
		/// 
		void SetReceiveCallback(NetworkCallback^ callback);
		/// 
		/// Sets the send callback delegate to be called when the packet is sent.
		/// 
		/// 
		void SetSendCallback(NetworkCallback^ callback);
		/// 
		/// Resets all the function hooks.
		/// 
		void ResetHooks();
	private:
		NetworkUnmanaged* _networkUnmanaged;
		NetworkCallback^ _sendCallback;
		NetworkCallback^ _receiveCallback;
	};
}