S
Somebody
So I'm trying to learn remoting. A few newbie questions that don't make
sense.
1)
TcpServerChannel channel = new TcpServerChannel(1234);
ChannelServices.UnregisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Proxy.ChatProxy),
"ChatProxy", WellKnownObjectMode.Singleton);
I get that the first two lines open up port 1234 and listen. Thats cool. But
how does the RegisterWellKnownServiceType() line know to use that port? What
if my app opened 2 ports and I wanted port A to do thing A and port B to do
thing B? I don't see how the RegisterWellKnownServiceType() has any
reference at all to the port number or to the channel.
2) if I telnet to port 1234 and just hit enter a few times, I get a remoting
exception. Thats cool and all, but it dumps out the stack trace. Any way to
handle the exception and do something "neater"?
sense.
1)
TcpServerChannel channel = new TcpServerChannel(1234);
ChannelServices.UnregisterChannel(channel);
RemotingConfiguration.RegisterWellKnownServiceType(typeof(Proxy.ChatProxy),
"ChatProxy", WellKnownObjectMode.Singleton);
I get that the first two lines open up port 1234 and listen. Thats cool. But
how does the RegisterWellKnownServiceType() line know to use that port? What
if my app opened 2 ports and I wanted port A to do thing A and port B to do
thing B? I don't see how the RegisterWellKnownServiceType() has any
reference at all to the port number or to the channel.
2) if I telnet to port 1234 and just hit enter a few times, I get a remoting
exception. Thats cool and all, but it dumps out the stack trace. Any way to
handle the exception and do something "neater"?