<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx</link><description>The client is actually done at this point. I don't know how many people have actually tried running the code or if you're all just following along. If you did try running the client, you would see a file appear on your hard drive, probably at c:\x\request.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Configuring WCF for NATs and Firewalls</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#588445</link><pubDate>Tue, 02 May 2006 19:14:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:588445</guid><dc:creator>Nicholas Allen's Indigo Blog</dc:creator><description>I've been providing the contents for this article in bits and pieces but now the whole thing is assembled...</description></item><item><title>Building a Custom File Transport, Part 11: Putting it Together</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#593702</link><pubDate>Tue, 09 May 2006 18:53:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:593702</guid><dc:creator>Nicholas Allen's Indigo Blog</dc:creator><description>Today's article is just a summary of what we've put together with the file transport and a demonstration...</description></item><item><title>re: Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#661260</link><pubDate>Mon, 10 Jul 2006 12:29:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661260</guid><dc:creator>damir</dc:creator><description>Hi Allen,&lt;br&gt;&lt;br&gt;I’m implementing the custom transport channel, which has to utilize IDuplexSessionChannel shape. I also read lot of your posts and probably, you should the right guy who can answer my questions.&lt;br&gt;&lt;br&gt;Imagine, there is a requirement to change your FileReplyChannelListener : ChannelListenerBase&amp;lt;IReplyChannel&amp;gt; to utilize the duplex-pattern as follows:&lt;br&gt;&lt;br&gt;public class MyTransportListener : ChannelListenerBase&amp;lt;IDuplexSessionChannel&amp;gt;&lt;br&gt;&lt;br&gt;I tried to do that and run into many, many questions.&lt;br&gt;First of all I am looking for proposed pattern for implementing of any of methods &lt;br&gt;&lt;br&gt;BeginSomething(TimeSpan, AsyncCallback, object) and &lt;br&gt;ISomething EndSomething(IAsyncResult)&lt;br&gt;&lt;br&gt;For example OnBeginAcceptChannel, OnEndAcceptChannel, BeginTryRaceive and EndTryReceive.&lt;br&gt;&lt;br&gt;How often the BeginAcceptChannel will be called?&lt;br&gt;&lt;br&gt;How often the BeginTryReceive will be called?&lt;br&gt;&lt;br&gt;I assume that dispatching of received messages on the higher level has to be done EndTryReceive in. If so, what is the way to implement continuous receiving? One ofter one message is dispatched by EndTryReceive the BeginTryRecive has to be called again?&lt;br&gt;</description></item><item><title>re: Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#661518</link><pubDate>Mon, 10 Jul 2006 19:57:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661518</guid><dc:creator>damir</dc:creator><description>Hi Allen,&lt;br&gt;&lt;br&gt;I tried your FileChannelTransport example and found out that instead of method OnAccptChannel the method OnBeginAcceptChannel is invoked.&lt;br&gt;Who and when decides which of &amp;quot;accept&amp;quot;-methods will be invoked?&lt;br&gt;Is that dependent on contract?&lt;br&gt;If so, here is the contract I used in your example:&lt;br&gt;&lt;br&gt;[ServiceContract]&lt;br&gt;public interface ITestService&lt;br&gt;{&lt;br&gt; [OperationContract]&lt;br&gt; &amp;nbsp;string Hello(string message);&lt;br&gt;}&lt;br&gt;</description></item><item><title>re: Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#661751</link><pubDate>Tue, 11 Jul 2006 01:26:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661751</guid><dc:creator>Nicholas Allen</dc:creator><description>Asynchronous programming is actually a pretty big topic to cover. &amp;nbsp;I'll have some posts on it in the future, but let me get you started with a few resources. &amp;nbsp;First, you'll want to read this general overview of the BeginXXX and EndXXX pattern for programming.&lt;br&gt;&lt;br&gt;&lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpovrAsynchronousProgrammingOverview.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpovrAsynchronousProgrammingOverview.asp&lt;/a&gt;&lt;br&gt;&lt;br&gt;This pattern appears in a lot of places in the .NET framework so having the big picture is reusable.&lt;br&gt;&lt;br&gt;As far as implementing async operations in a channel, I would recommend checking out our UDP transport sample in the Windows Platform SDK. &amp;nbsp;You may have to dig around a bit to find the WCF samples. &amp;nbsp;This sample implements the async methods and includes all of the helper classes you'll need to do this.&lt;br&gt;&lt;br&gt;In terms of when methods get called, it's a long cascade from your service down to the transport level. &amp;nbsp;The top level will get triggered by either a sync or async call and that style tends to get used all the way down the stack. &amp;nbsp;The service host dispatcher is a common trigger for these calls since it basically runs in a loop at the top level taking messages until the service quotas are reached. &amp;nbsp;I think that the service host has a setting to indicate whether sync or async methods will be called (default async) although I can't remember the setting name off the top of my head. &amp;nbsp;When you program against the channel layer you of course are in total control of whether you call the sync or async version.</description></item><item><title>re: Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#661788</link><pubDate>Tue, 11 Jul 2006 02:21:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:661788</guid><dc:creator>damir</dc:creator><description>Allen, thanks for the quick answer. My question was more related to the “game” between service model runtime and BeginXXX/EndXXX methods. First thing, which confuses me is that all examples implement sync pattern only.&lt;br&gt;However, by using of service model the default pattern is, as you wrote, async-pattern.&lt;br&gt;&lt;br&gt;I use following pattern:&lt;br&gt;&lt;br&gt;Create Binding&lt;br&gt;CreateHost(A,B,C)&lt;br&gt;OpenHost()&lt;br&gt;&lt;br&gt;What I would like to have is a recommendation how to deal with channels in service model context?&lt;br&gt;How channels should be created and how many of them, should generally depend on the connection state etc?&lt;br&gt;&lt;br&gt;I think the fully implemented (with BeginXXX/EndXXX) working FileTransportChannel with service and client example would help.&lt;br&gt;</description></item><item><title>re: Building a Custom File Transport, Part 8: Channel Listener</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#662776</link><pubDate>Wed, 12 Jul 2006 01:45:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:662776</guid><dc:creator>Nicholas Allen</dc:creator><description>Most samples only implement the sync case because it is much less code to do so. &amp;nbsp;Handling async calls makes the sample five times as large and people have a hard time reading through it. &amp;nbsp;We are trying to expand more of our samples to include async support as a demonstration. &amp;nbsp;Currently, the best one is the UDP transport in the Windows SDK. &amp;nbsp;The readme for that sample talks about many of these issues.&lt;br&gt;&lt;br&gt;In general, the transport author shouldn't worry too much about when channels are created. &amp;nbsp;The transport creates a channel when a higher layer (typically the service host) asks for one. &amp;nbsp;The service host will decide how many channels it should have at once and when to accept a new one. &amp;nbsp;The transport basically needs to provide two things. &amp;nbsp;One is to provide a place for deferring pending connection attempts by client. &amp;nbsp;The other is to accept one of the deferred connections or wait for a new connection to arrive when the higher layer asks for a channel.</description></item><item><title>Configuring WCF for NATs and Firewalls</title><link>http://blogs.msdn.com/drnick/archive/2006/05/02/585612.aspx#837076</link><pubDate>Wed, 18 Oct 2006 02:46:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:837076</guid><dc:creator>Nicholas Allen's Indigo Blog</dc:creator><description>&lt;p&gt;I've been providing the contents for this article in bits and pieces but now the whole thing is assembled&lt;/p&gt;
</description></item></channel></rss>