"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "html/muscle-by-example/examples/reflector/example_5_smart_client.cpp" between
muscle8.20.zip and muscle8.30.zip

About: MUSCLE (Multi User Server Client Linking Environment) is a messaging server and networking API. The included server program ("muscled") lets its clients message each other, and/or store information in its serverside hierarchical database.

example_5_smart_client.cpp  (muscle8.20):example_5_smart_client.cpp  (muscle8.30)
skipping to change at line 222 skipping to change at line 222
PrintExampleDescription(); PrintExampleDescription();
// Let's enable a bit of debug-output, just to see what the client is doing // Let's enable a bit of debug-output, just to see what the client is doing
SetConsoleLogLevel(MUSCLE_LOG_DEBUG); SetConsoleLogLevel(MUSCLE_LOG_DEBUG);
ReflectServer reflectServer; ReflectServer reflectServer;
status_t ret; status_t ret;
MySmartStdinSession myStdinSession; MySmartStdinSession myStdinSession;
if (reflectServer.AddNewSession(AbstractReflectSessionRef(&myStdinSession, fa lse), GetInvalidSocket()).IsError(ret)) if (reflectServer.AddNewSession(DummyAbstractReflectSessionRef(myStdinSession ), GetInvalidSocket()).IsError(ret))
{ {
LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't add MySmartStdinSession to the client, aborting! [%s]\n", ret()); LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't add MySmartStdinSession to the client, aborting! [%s]\n", ret());
return 10; return 10;
} }
// Still using a DumbReflectSession here since all we need is Message-forward ing. // Still using a DumbReflectSession here since all we need is Message-forward ing.
// (All of the client's "smarts" will be implemented in the MySmartStdinSessi on class) // (All of the client's "smarts" will be implemented in the MySmartStdinSessi on class)
DumbReflectSession tcpSession; DumbReflectSession tcpSession;
if (reflectServer.AddNewConnectSession(AbstractReflectSessionRef(&tcpSession, false), localhostIP, SMART_SERVER_TCP_PORT, SecondsToMicros(1)).IsError(ret)) if (reflectServer.AddNewConnectSession(DummyAbstractReflectSessionRef(tcpSess ion), localhostIP, SMART_SERVER_TCP_PORT, SecondsToMicros(1)).IsError(ret))
{ {
LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't add StorageReflectSession to t he client, aborting! [%s]\n", ret()); LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't add StorageReflectSession to t he client, aborting! [%s]\n", ret());
return 10; return 10;
} }
LogTime(MUSCLE_LOG_INFO, "This program is designed to be run in conjunction w ith example_4_smart_server\n"); LogTime(MUSCLE_LOG_INFO, "This program is designed to be run in conjunction w ith example_4_smart_server\n");
LogTime(MUSCLE_LOG_INFO, "You'll probably want to run multiple instances of t his client at the same time, also.\n"); LogTime(MUSCLE_LOG_INFO, "You'll probably want to run multiple instances of t his client at the same time, also.\n");
printf("\n"); printf("\n");
PrintHelp(); PrintHelp();
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)