"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "html/muscle-by-example/examples/reflector/example_3_annotated_dumb_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_3_annotated_dumb_server.cpp  (muscle8.20):example_3_annotated_dumb_server.cpp  (muscle8.30)
skipping to change at line 131 skipping to change at line 131
PrintExampleDescription(); PrintExampleDescription();
// 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 DumbReflectSession object whenever // This factory will create a DumbReflectSession object whenever
// a TCP connection is received on DUMB_SERVER_TCP_PORT, and // a TCP connection is received on DUMB_SERVER_TCP_PORT, and
// attach the DumbReflectSession to the ReflectServer for use. // attach the DumbReflectSession to the ReflectServer for use.
status_t ret; status_t ret;
MyDumbReflectSessionFactory dumbSessionFactory; MyDumbReflectSessionFactory dumbSessionFactory;
if (reflectServer.PutAcceptFactory(DUMB_SERVER_TCP_PORT, ReflectSessionFactor yRef(&dumbSessionFactory, false)).IsError(ret)) if (reflectServer.PutAcceptFactory(DUMB_SERVER_TCP_PORT, DummyReflectSessionF actoryRef(dumbSessionFactory)).IsError(ret))
{ {
LogTime(MUSCLE_LOG_CRITICALERROR, "Couldn't bind to TCP port %u! (Perhaps a copy of this program is already running?) [%s]\n", DUMB_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", DUMB_SERVER_TCP_PORT, ret ());
return 5; return 5;
} }
// Here's where our server will spend all of its time // Here's where our server will spend all of its time
LogTime(MUSCLE_LOG_INFO, "example_3_annotated_dumb_server is listening for in coming TCP connections on port %u\n", DUMB_SERVER_TCP_PORT); LogTime(MUSCLE_LOG_INFO, "example_3_annotated_dumb_server is listening for in coming TCP connections on port %u\n", DUMB_SERVER_TCP_PORT);
LogTime(MUSCLE_LOG_INFO, "Try running one or more instances of example_2_dumb _client to connect and chat!\n"); LogTime(MUSCLE_LOG_INFO, "Try running one or more instances of example_2_dumb _client to connect and chat!\n");
printf("\n"); printf("\n");
 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)