예제 #1
0
	static int Main () {

		Test t1 = new Test ();
		ObjRef myref = RemotingServices.Marshal (t1, "/test");
		Console.WriteLine ("OBJREF: " + myref.URI);
		
		string url = "simple://localhost:8000/test";
		string uri;
		
		SimpleChannel chnl = new SimpleChannel (8000);
		ChannelServices.RegisterChannel (chnl);

		Console.WriteLine ("Channel name: " + chnl.ChannelName);
		Console.WriteLine ("Channel priority: " + chnl.ChannelPriority);
		Console.WriteLine ("URI: " + chnl.Parse (url, out uri));
		Console.WriteLine ("URI: " + uri);
		

		Test tp = (Test)RemotingServices.Connect (typeof (Test), url);

		int res = tp.test_function (4, true);

		Console.WriteLine ("RESULT: " + res);
		
		chnl.StopListening (null);
		
		return 0;
	}
예제 #2
0
        public string Parse(string url, out string objectURI)
        {
            int port;

            string host = SimpleChannel.ParseSimpleURL(url, out objectURI, out port);

            return(GetChannelUri());
        }
예제 #3
0
        public string Parse(string url, out string objectURI)
        {
            int port;

            string host = SimpleChannel.ParseSimpleURL(url, out objectURI, out port);

            return("simple://" + host + ":" + port);
        }
예제 #4
0
 public SimpleClientTransportSink(string url)
 {
     host      = SimpleChannel.ParseSimpleURL(url, out object_uri, out port);
     tcpclient = new TcpClient();
 }