/*!
 *  \addtogroup NetSend
 *  @{
 */
 
/**
 * @brief Network send/write functions. Should only be called for the server player @code{.cpp} Network.IsNetgame() && Network.IsServer() @endcode Only clients and not the server will receive sent data.
 * \n\n Usage example:
 * @code{.cpp}
        if (Network.IsNetgame() && Network.IsServer())
        {
            NetSend::Clear();
            NetSend::WriteScriptHeader("void ReceiveANumber()");
            NetSend::WriteInt16(64);
            
            Network.TransmitToAll();
        }
 * @endcode
 */
namespace NetSend
{
	/**
	 * @brief Removes script header and all int data from waiting to be transmitted to clients. Call before doing any writes.
	 */
	void Clear();
	
	/**
	 * @brief Writes a function script header which will be called on global scope when recieved by clients. Call after NetSend::Clear
	 * @code{.cpp}
	 * NetSend::WriteScriptHeader("void NetworkRecvSpawnBoreController()");
	 * @endcode
	 */
	void WriteScriptHeader(const kStr&in funcHeader);
	
	/**
	 * @brief Writes an int16. Call after NetSend::WriteScriptHeader
	 */
	void WriteInt16(int16); //call after WriteScriptHeader
	
	/**
	 * @brief Writes an int16. Call after NetSend::WriteScriptHeader
	 */
	void WriteInt32(int32); //call after WriteScriptHeader
}

/**@}*/
