Browse DevX
Sign up for e-mail newsletters from DevX


Getting Started with Remoting in .NET  : Page 3

Use remoting in .NET to let isolated processes communicate with each other and improve security and stability at the same time.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

A channel is an object that implements communication between a client and a remote object, across app domain boundaries. The .NET Framework implements two default channel classes, as follows:
  • HttpChannel: Implements a channel that uses the HTTP protocol.
  • TcpChannel: Implements a channel that uses the TCP protocol (Transmission Control Protocol).
Both of these classes are dual-purpose in that they implement both a client channel, used on the client side to communicate with remote objects, and a server channel, used on the server side to communicate with clients. The HttpChannel class formats messages using the SOAP protocol, which encodes communications as XML. In contrast the TcpChannel class uses a binary format for messages. While binary formatting is more efficient (formatted messages are smaller), the plain text format of SOAP is much less likely to have problems with firewalls and other network security measures.

When you create a server—that is, a remotable class—you also define and register one or more channels for the class and associate each channel with a specific port. By registering a channel/port combination you tell the .NET infrastructure to listen on that port for messages intended for that channel. When a message arrives, the framework routes it to the correct server object. Figure 2 illustrates how the client and server communicate. Note that when you're using remoting on a single system, the port numbers used by the client and server cannot be the same, because you can use a given port only once.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date