# Various networking code cleanups.

Don't flush network queue after every message.
Desingletonify CGameAttributes to allow testing.
Make network server/client basically testable.
Add very basic tests for network server/client.
Fix FsmActionCtx memory leak.
Split CNetHost into a separate file.
Convert CNetHost, CNetSession to a more conventional coding style.
Delete CNetLogger, since it's a lot of complexity and is barely used and
is redundant with CLogger.
Other minor simplifications.

This was SVN commit r7623.
This commit is contained in:
Ykkrosh
2010-06-07 22:19:05 +00:00
parent 2c160e5bd8
commit dfb10c8209
24 changed files with 910 additions and 2525 deletions
+6
View File
@@ -334,6 +334,9 @@ void ScriptingHost::ErrorReporter(JSContext* UNUSED(cx), const char* pmessage, J
void* ScriptingHost::jshook_script( JSContext* UNUSED(cx), JSStackFrame* UNUSED(fp),
JSBool before, JSBool* UNUSED(ok), void* closure )
{
if (!CProfileManager::IsInitialised())
return closure;
if( before )
{
g_Profiler.StartScript( "script invocation" );
@@ -346,6 +349,9 @@ void* ScriptingHost::jshook_script( JSContext* UNUSED(cx), JSStackFrame* UNUSED(
void* ScriptingHost::jshook_function( JSContext* cx, JSStackFrame* fp, JSBool before, JSBool* UNUSED(ok), void* closure )
{
if (!CProfileManager::IsInitialised())
return closure;
JSFunction* fn = JS_GetFrameFunction( cx, fp );
if( before )
{