Channel Development Survey

The WCF channels team has posted a short survey on channel development to collect some of your feedback about what to work on after .Net 4 is released. You can help them out if you’ve previously written or tried to write a layered channel, transport channel, or message encoder. The survey should only take a…

0

Parsing Standard Uris, Part 2

Here’s another look at defining what it means to have a URI for the TCP or named pipe transports. You can compare these definitions to the version I gave yesterday using the parser syntax flags. I’ll only cover the net.tcp URI scheme as the two are almost identical except for the use of ports. What…

2

Parsing Standard Uris

The System.Uri class has built-in parsing rules for a variety of schemes, including http, https, file, ftp, gopher, mailto, news, nntp, telnet, and ldap. There are also parsers for the WCF net.tcp and net.pipe schemes. These parsing rules allow a uri using the scheme to be recognized, broken into its component parts, and validated for…

0

Finding the Remote Client Address

After being a highly-requested feature, back in .Net 3.5 we added the ability to see the network address from which the client request had arrived. Here’s how it works. Participating transports capture the client’s network address using whatever sources of information they have available. The transport then attaches a message property to the received message…

1

Three Networking Questions Answered with Samples

How do I remove or change the framing headers used for a TCP connection? By writing a transport channel you can control exactly what information is read or written to the TCP socket. An example of doing this is in the WSE interoperability sample. How do I pass credentials from the client to the service…

0

What’s New in WCF 4: Channels

As we get closer to the release of .Net 4 it becomes easier to talk about exactly what new features we’re planning to provide. This list is a bit different in places from what you’ve seen in the beta 1 release and there’s always a chance that things might change again. The first part of…

8

Finding Free Ports, Part 2

Yesterday I talked about the algorithm the TCP transport uses to reserve a unique port when listening on both IPv4 and IPv6 addreses is enabled for a service. Why are the random port numbers drawn from the range 49152-65535? Because that’s the range the operating system uses for dynamic port allocations. Sometimes. The IANA divides…

0

Finding Free Ports

One of the options for the listen URI for the TCP transport is to let the transport make the address unique by filling in details such as the port number. The socket API allows specifying a wildcard port but at the time WCF was written the wildcard port option could only be used with a…

2

Top Down Binding Element Order

Why does a message encoder have to be specified before the transport when constructing a binding? A message encoder doesn’t directly fit into a channel stack because the message encoder type doesn’t implement any of the channel shapes. Instead, a message encoder is an auxilliary piece used by one of the channels in the channel…

0

Just Exactly What You Asked For

When implementing a transport or layered channel class the marker used to indicate that your class is a channel is to implement the IChannel interface. Therefore, all channels will implement one of the known channel shapes: IInputChannel, IOutputChannel, IDuplexChannel, IRequestChannel, or IReplyChannel (optionally you might use the sessionful variant of one of these channel shapes…

0