[muscle] Re: node path info

  • From: Jeremy Friesner <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Sat, 18 Jun 2005 14:55:32 -0700

On Saturday 18 June 2005 12:48, VANHERP Wim wrote:
> 2) when a client has subscribed to receive messages from several nodes,
> is it possible to see from wich node-paths the message is that he
> receives ?

Hm, maybe I understand the question better now.  Let me rephrase it into what 
I think you might have meant:

2) When another client sends a Message to my client via the server, is there 
any way to tell which client the Message originated from?

The answer is yes, if the sending client added a string field to his Message 
with the field name PR_NAME_SESSION.  It doesn't matter what string he adds, 
because the server checks for this special field name and if it exists, the 
server will automatically replace its string-value with the session ID of the 
sending client.  (This was added to prevent people from "spoofing" messages 
from other clients ... someone on BeShare had figured out how to hack their 
client so that they could put words into other peoples' mouths, which was a 
great way to cause chaos :^))

So if you get a message from the server that has a PR_NAME_SESSION string 
field in it, you can be sure that the message is from the client specified in 
that field.  If the message doesn't have a PR_NAME_SESSION string field 
(because the sender didn't add one), then there is no guaranteed way to know 
where it came from.

-Jeremy

Other related posts: