Trevor
Trevor

Reputation: 4860

How does a WCF channel work?

I think I'm missing something conceptual and fundamental about WCF channels. I get how there's a channel stack of protocols on either side going from the top level TCP or HTTP down to the wire-level transport protocol.

What I don't get is what it means to "open" a channel and how that channel stays "open" and how that channel is "faulted".

What is happening on the client and service that makes a channel "open"? Open seems like a sate but it's hard for me to conceptualize state in a stateless service. Does that make sense?

Upvotes: 1

Views: 1730

Answers (1)

ErnieL
ErnieL

Reputation: 5801

Your service may be stateless, but many networking protocols are not.

From Understanding State Changes

State Machines and Channels

Objects that deal with communication, for example sockets, usually present a state machine whose state transitions relate to allocating network resources, making or accepting connections, closing connections and terminating communication. The channel state machine provides a uniform model of the states of a communication object that abstracts the underlying implementation of that object. The ICommunicationObject interface provides a set of states, state transition methods and state transition events. All channels, channel factories and channel listeners implement the channel state machine.

The whole WCF Channel Model Overview is a good resource.

Upvotes: 1

Related Questions