Re: Remoting client channel
client??? clients aren't as important as the server objects. you should be ok without messing with the client. if you have multiple threads that may publish / revoke the server object, then yea, you need to manage that.
Re: Remoting client channel
Thank you very much for your reply
Regarding the client - is it possible that response that arrives thru the same channel to several different clients at the same time going to be mixed?
Regarding the server - the SingleCall setting insure that separate object is going to be created on server side for each client request. Does separate channel also created automatically for each client connection on the server side? or I have to manage that?
Re: Remoting client channel
channels are created independently of the objects for a reason. because .NET takes care of what uses what.
nothing will ever get stepped on / stumbled over. remoting isn't some simple tcp connection where one object might use another objects info off the TCP stack to initialize objects randomly. each server object is created on the client side through a transparent proxy and can only be unwrapped by that proxy.
single call objects are like disposable objects. they are used once and then destroyed on the client's end.
Re: Remoting client channel
Thank you for your help.
It is SO different from the classic TCP client/server I used before...
I'm just double-checking if it is OK to create and register just ONE channel on the client side and share it for all the concurrent client calls?
Is the following code correct:
if (!_RemotingClientConfigDone)
{
TcpChannel channel = new TcpChannel();
ChannelServices.RegisterChannel(channel, false);
_RemotingClientConfigDone = true;
}
obj = Activator.GetObject(
remotingObjectType,
objectUrl);
where _RemotingClientConfigDone is defined as a static variable in the class:
static bool _RemotingClientConfigDone = false;
Thank you,
a_k_