public unsafe void TestDisableFromPlayerConnectionDoesntSend()
        {
            ProfilerProtocolThread.Stream.buffer->m_BufferList->RecycleStreamAndFreeExtra();

            PlayerConnectionProfiler.Shutdown();

            ProfilerMarker marker = new ProfilerMarker("Test marker");

            marker.Begin();
            marker.End();

            Assert.Zero(ProfilerProtocolThread.Stream.buffer->m_BufferList->TotalBytes);
        }
        public unsafe void TestEnableFromPlayerConnection()
        {
            PlayerConnectionProfiler.Shutdown();

            PlayerConnectionProfiler.Initialize();
            Assert.IsFalse(PlayerConnectionProfiler.Enabled);
            ReceiveConnectMessage();

            Assert.IsTrue(PlayerConnectionProfiler.Enabled);

            PlayerConnectionProfiler.Shutdown();
            Assert.IsFalse(PlayerConnectionProfiler.Enabled);
        }
        public unsafe void TestEnableFromPlayerConnectionResponds()
        {
            ProfilerProtocolSession.streamSession.buffer->m_BufferList->RecycleStreamAndFreeExtra();

            PlayerConnectionProfiler.Shutdown();
            PlayerConnectionProfiler.Initialize();

            Assert.Zero(ProfilerProtocolSession.streamSession.buffer->m_BufferList->TotalBytes);

            ReceiveConnectMessage();

            // When we receive a connection, we should react by sending out some information
            Assert.NotZero(ProfilerProtocolSession.streamSession.buffer->m_BufferList->TotalBytes);

            PlayerConnectionProfiler.Shutdown();
        }