Remoting -how to decide which Delegate i need to Invoke (Private Msgs)
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hello Im writing a simple messenger and im having trouble with the "Private Messages" i worte the shared object between the clinet and the server later all the clients subscribe to the server events Let Say "User Send Message" event Now ,Let say that User "michael" wants to send Message to "liron" So im iterating in server side on each Subscriber , How can i know which of the subscribers are "liron"? can i find any value that identify "liron "?
UserSendMsgHandler messageDelegate = null;
Delegate[] invocationList_ = null;
try
{
invocationList_ = onUserSendMsg.GetInvocationList();
}
catch
{} if (invocationList\_ != null) { lock (this) { foreach (Delegate del in invocationList\_) { try { messageDelegate = (UserSendMsgHandler)del; messageDelegate(Msg,Sender,Receivers\[0\]); } catch { onUserSendMsg -= messageDelegate; } } } }