"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/testreflectclient.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.

testreflectclient.cpp  (muscle8.20):testreflectclient.cpp  (muscle8.30)
skipping to change at line 187 skipping to change at line 187
char * hostName = "localhost"; char * hostName = "localhost";
int port = 0; int port = 0;
int method = -1; int method = -1;
if (argc > 1) if (argc > 1)
{ {
if (strcmp(argv[1], "-connect") == 0) if (strcmp(argv[1], "-connect") == 0)
{ {
method = METHOD_AUTOMATIC; method = METHOD_AUTOMATIC;
if (argc > 2) hostName = argv[2]; if (argc > 2) hostName = argv[2];
if (argc > 3) port = atoi(argv[3]); if (argc > 3) port = muscleMax(0, atoi(argv[3]));
if (port <= 0) port = 2960;
} }
else if (strcmp(argv[1], "-connectsync") == 0) else if (strcmp(argv[1], "-connectsync") == 0)
{ {
method = METHOD_MANUAL; method = METHOD_MANUAL;
if (argc > 2) hostName = argv[2]; if (argc > 2) hostName = argv[2];
if (argc > 3) port = atoi(argv[3]); if (argc > 3) port = muscleMax(0, atoi(argv[3]));
if (port <= 0) port = 2960;
} }
else if (strcmp(argv[1], "-accept") == 0) else if (strcmp(argv[1], "-accept") == 0)
{ {
method = METHOD_ACCEPT; method = METHOD_ACCEPT;
if (argc > 2) port = atoi(argv[2]); if (argc > 2) port = muscleMax(0, atoi(argv[2]));
} }
} }
if (port == 0) port = 2960;
if (method != -1) if (method != -1)
{ {
BMessageTransceiverThread mtt; BMessageTransceiverThread mtt;
MyLooper * looper = new MyLooper(mtt); MyLooper * looper = new MyLooper(mtt);
looper->Run(); looper->Run();
mtt.SetTarget(looper); mtt.SetTarget(looper);
if ((mtt.StartInternalThread().IsOK())&&(SetupTransceiverThread(mtt, hostN ame, (uint16)port, method).IsOK())) if ((mtt.StartInternalThread().IsOK())&&(SetupTransceiverThread(mtt, hostN ame, (uint16)port, method).IsOK()))
{ {
char text[1000]; char text[1000];
 End of changes. 4 change blocks. 
5 lines changed or deleted 4 lines changed or added

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