Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have created a Remote Object Class "OCL" to communicate b/w Server & Client.

Server Side :
HttpChannel myChannel = new HttpChannel(6300);
         ChannelServices.RegisterChannel(myChannel);
         RemotingConfiguration.RegisterWellKnownServiceType(typeof(OCL), "OCL", WellKnownObjectMode.Singleton);


Client Side :
OCL object= (OCL)Activator.GetObject(typeof(OCL), "http://" + ServerIP + ":6300/OCL", WellKnownObjectMode.Singleton);



It is working fine for sending data from Server to Client. How can i send data from Client to server? Plz Help. Thanks.
Posted

1 solution

When you are invoking methods on a remote object, everything's analogous to how you'd be invoking those methods on a local object. Sending data and receiving data is just a matter of whether you are calling a method that returns data or whether you are calling a method that has parameters through which you can send data to an object. For example a method GetBytes which returns a byte array is an example of receiving data, whereas an equivalent method called SetBytes(byte[] arg) is fairly obviously a method for sending data.
 
Share this answer
 
Comments
Espen Harlinn 12-Apr-11 15:59pm    
Nice and simple, my 5 :)
Nish Nishant 12-Apr-11 16:04pm    
Thanks Espen!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900