Home > WCF > WCF # 11–WCF Channel Objects [WCF Channel Listeners,WCF Factories]

WCF # 11–WCF Channel Objects [WCF Channel Listeners,WCF Factories]

Hi Geeks,

In our last post Channel shapes and Communication Patterns we saw how channels are used to transform message from client to server and vice versa.

Today we will see Channel Objects and how they work .

There are three categories of channel objects

1) Channel

2) Channel Listeners (Responsible for server side communication)

3) Channel Factory ((Responsible for client side communication))


1) Channels work as interface between the application and Channel Stack For more on channel stack see Channels and Channel Stack.

2) Channel listeners form the base for server side communication.

    * They are responsible for listening for incoming messages, creating channel
       stacks, and providing a reference to the top of the stack to applications

    * It is responsible for creating channel stack at receiver end.

    * They receive messages from either the transport channel or the channel below in
     the channel stack

Note – Most developers will not work with channel listeners directly. They will use the ServiceHost class to host services, which uses a channel listener to listen for messages


3) Channel Factory

* A channel factory creates a channel for sending messages and maintains
ownership of the channels it creates.

* These channels are responsible for getting the message from the layer above, performing whatever processing is necessary, then sending the message to the layer below.

Note – Most developers will never use a channel factory directly. Instead, they will use a class derived from ClientBase<> which is typically generated from svcutil.exe or Add Service Reference in Visual Studio.

Difference between channel listeners and channel factories

channel factories are responsible for closing down all associated channels;                       channel listeners are not.                                                                                                         This distinction was made so that channel listeners could be shut down independent of their channels

Hope this will help you.

Thank You.

Categories: WCF
  1. October 19, 2011 at 6:57 am

    nice work

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: