In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the WCF channel". Friends who are interested may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what the WCF channel is.
First, we will look at the internal mechanism of the channel, and then look at how to use the WCF class to implement a channel.
What is the WCF channel
If service is compared to the human body, then the channel is the nervous system we serve. The nervous system bears the burden of receiving information from various parts of the body and transmitting it to the brain. Different sensory information is transmitted to the brain in the same way through multiple nerves. Like the nervous system, WCF channels establish and transmit messages and transfer them from one channel to another. But unlike the nervous system, instead of using sensory receptors to receive information, channels build information by receiving bytes from the network.
There are two channel types: transport channel (Transport Channels) and protocol channel (Protocol Channels). The transmission channel is responsible for communication in the network. The protocol channel is responsible for things such as data encryption and decryption. The message at the top of the channel stack is fetched and sent by a series of WCF classes called Dispatcher, and the Dispatcher will be created and mapped to the Contract of our service. The arrangement of the entire channel stack and Dispatcher:
A transport channel is located on the * * end of the channel stack. Data (messages) flow from the transport channel through a set of channels located on the channel stack. A Dispatcher is actually a collection of classes. Dispatcher construction is not discussed in detail in this article, but if you want to learn more about Dispatcher, please refer to the relevant WCF documentation. Maybe by now we can guess that there are far more channels in the channel stack than we thought. It is the existence of these channels that makes the channel stack do magic work.
What is a channel stack?
A channel stack consists of many channels (Channels), channel manager (ChannelManagers), and other classes that perform special tasks, such as classes that convert byte streams into messages. This article will focus on the role of channels and channel managers.
The channel manager is responsible for establishing and maintaining channels. The Channel Manager consists of the following two parts:
1. The Channel Factory (ChannelFactories) establishes and manages channels through a client communication system.
two。 A channel listener (ChannelListeners) establishes and manages channels through a service.
This article will focus on services located within WCF, so we will focus on the role of channel listeners and channels in the channel stack throughout the system. A Bindings is a collection of binding elements. These binding elements establish channel listeners, and listeners establish and manage channels.
According to Microsoft documentation, data from one channel to another decays, and these are captured and processed by channel listeners. Before we discuss how channel listeners and channels work together and provide us with communication services, there is an important idea that must be understood. A state machine manages all states in WCF communications. The states in the state machine are predictable, such as Open, Abort, Close, and so on. All classes that participate in the communication state machine support the ICommunicationObject interface. If you want to know the complete definition of WCF communication state machine, please refer to the relevant WCF documentation.
At this point, I believe you have a deeper understanding of "what the WCF channel is". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.