Possible Duplicate:
Identifying the client during a .NET remoting invocation
I have a client/server app, in which server-side part publishes static object in that way:
RemotingServices.Marshal(rem, "testRemoteObject");
Many client-side parts connect to It simultaneously through:
TestInterface remote = (TestInterface)RemotingServices.Connect(typeof(TestInterface),
"tcp://localhost:4500/testRemoteObject");
All is working fine, but I need determine on server-side, which client calls method, like this:
public void PrintMsg(string msg)
{
Console.WriteLine("Message from client: " + msg);
}
I see one path: each client sends its id as method argument, but in this case clients may send id of another client. How can I do what I want?