[muscle] Re: FW: testclient for win32

  • From: "Jeremy Friesner" <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Tue, 24 May 2005 08:54:41 PDT (-0700)

Hi there,

The only thing I can think of is maybe you didn't declare a CompleteSetupSystem 
object on the stack at the top of main()=3F  MUSCLE needs that object to be 
declared there so that the networking system will be set up properly.  (you 
don't have to do anything with it, just declare it).

If that's not it, another (slim) possibility is that maybe your computer 
doesn't know what "localhost" is for some reason... you could try replacing 
"localhost" in the AddNewConnectSession line either with the string "" 
or the constant uint32 localhostIP (which is declared in 

If none of that works, then the next step would be either to post the complete 
source code of a small program that can be compiled and demonstrates the 
problem... or you can go in to muscle/system/MessageTransceiverThread.cpp with 
your text editor, and start adding printf()'s into the AddNewConnectSession() 
function and until it becomes obvious why the function is failing...

Hope that helps,

ps Note that you should call StartInternalThread() on your thread object no 
matter what.  It shouldn't matter whether you call StartInternalThread() before 
AddNewConnectSession() or afterwards, though.

> Hallo,
> i have tried to make a testclient to connect to a running muscled server
> but i haven't succeeded up to now.
> This is what i did :
> first i created an instance of Win32MessageTransceiverThread:
> Win32MessageTransceiverThread *  m=5FMuscleClientThread   =3D    new
> Win32MessageTransceiverThread(GetCurrentThreadId())
> then i did :
> status=5Ft
> status=3Dm=5FMuscleClientThread->AddNewConnectSession("localhost",2960);
> here i got -1 as statusresult 
> if the status should be !=3D-1 i wanted to run :
> status=3D m=5FMuscleClientThread->StartInternalThread();
> MessageRef NewMsg=3DGetMessageFromPool('HELO');
> .... here i can follow the example in the beginners guide
> Is this correct what i am doing =3F 
> regards 
> *** Disclaimer ***
> Deze e-mail, met eventuele bijlagen, is alleen bestemd voor de persoon of 
> organisatie aan wie hij gericht is en, in voorkomend geval, alleen voor het 
> daarin opgegeven doel of gebruik. Hij kan vertrouwelijke informatie bevatten 
> en/of persoonlijke standpunten die niet noodzakelijk met die van de VRT 
> stroken. Elk gebruik van deze informatie (zoals bewerken, doorsturen, geheel 
> of gedeeltelijk reproduceren of verspreiden in welke vorm ook) door anderen 
> dan de geadresseerde, is verboden. Hebt U deze e-mail per vergissing 
> ontvangen, meld dat dan a.u.b. aan de VRT en wis de e-mail.

Other related posts: