"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "html/muscle-by-example/examples/reflector/example_4_smart_server.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_4_smart_server.cpp  (muscle8.20):example_4_smart_server.cpp  (muscle8.30)
skipping to change at line 38 skipping to change at line 38
SetConsoleLogLevel(MUSCLE_LOG_DEBUG); SetConsoleLogLevel(MUSCLE_LOG_DEBUG);
// This object contains our server's event loop. // This object contains our server's event loop.
ReflectServer reflectServer; ReflectServer reflectServer;
// This factory will create a StorageReflectSession object whenever // This factory will create a StorageReflectSession object whenever
// a TCP connection is received on SMART_SERVER_TCP_PORT, and // a TCP connection is received on SMART_SERVER_TCP_PORT, and
// attach the StorageReflectSession to the ReflectServer for use. // attach the StorageReflectSession to the ReflectServer for use.
status_t ret; status_t ret;
StorageReflectSessionFactory smartSessionFactory; StorageReflectSessionFactory smartSessionFactory;
if (reflectServer.PutAcceptFactory(SMART_SERVER_TCP_PORT, ReflectSessionFacto ryRef(&smartSessionFactory, false)).IsError(ret)) if (reflectServer.PutAcceptFactory(SMART_SERVER_TCP_PORT, DummyReflectSession FactoryRef(smartSessionFactory)).IsError(ret))
{ {
LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't bind to TCP port %u! (Perhaps a copy of this program is already running?) [%s]\n", SMART_SERVER_TCP_PORT, ret ()); LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't bind to TCP port %u! (Perhaps a copy of this program is already running?) [%s]\n", SMART_SERVER_TCP_PORT, ret ());
return 5; return 5;
} }
LogTime(MUSCLE_LOG_INFO, "example_4_smart_server is listening for incoming TC P connections on port %u\n", SMART_SERVER_TCP_PORT); LogTime(MUSCLE_LOG_INFO, "example_4_smart_server is listening for incoming TC P connections on port %u\n", SMART_SERVER_TCP_PORT);
LogTime(MUSCLE_LOG_INFO, "Try running one or more instances of example_5_smar t_client to connect/chat/subscribe!\n"); LogTime(MUSCLE_LOG_INFO, "Try running one or more instances of example_5_smar t_client to connect/chat/subscribe!\n");
LogTime(MUSCLE_LOG_INFO, "\n"); LogTime(MUSCLE_LOG_INFO, "\n");
// Our server's event loop will run here -- ServerProcessLoop() will not retu rn until it's time for the server to exit // Our server's event loop will run here -- ServerProcessLoop() will not retu rn until it's time for the server to exit
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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