[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] sendmsg() function



On Thursday 21 June 2001 11:01, Bhagyalaxmi Bethala wrote:
> I was asking regarding the sendmsg function with signature
> 	void sengmsg(int bytes)
> because it is called in the agent.cc in
> command method this way. But I cudn't find a corresponding function
> with inly argument as int anywhere.

Sorry, my mistake.  If you looked only in the .cc files, you wouldn't 
find it.  You have to look two places to find what is really 
happening.

Look in agent.h for the following prototype:

agent.h:  virtual void sendmsg(int nbytes, const char *flags = 0);    

Then in agent.cc you get the following start of a function definition:

agent.cc:void Agent::sendmsg(int /*nbytes*/, const char* /*flags*/)

If you don't provide a second argument, the compiled version will 
assume that it is NULL (the default value).  So this two argument 
method is the one that gets called if you provide only a single int 
as the parameter list.

-- 
Brian Lee Bowers	|	RADIANT Team
[email protected]	|	Los Alamos National Laboratory