C# .NET Web Developer's Guide

Summary

This chapter presents some examples of how to implement networking applications with the .NET Framework.

The most widely used protocols in networking are TCP and UDP. You can use TCP for reliable client/server applications because it is a reliable and connection-oriented protocol. On the other hand, you can use UDP for applications such as DNS, time servers, Internet telephony, and streaming multimedia in general because it is faster than TCP. The better performance is caused by the relative unreliability of the protocol. If a packet of data gets lost, no administrative overhead is needed to resend it. UDP also supports another option: multicasting. Multicasting means that one application sends data simultaneously to a group of applications without the knowledge of which kinds of applications are listening, or how many.

The chapter discussed the meaning of ports for developing networking applications only if an application is registered with a port it can be reached by other processes.

As introductory examples, we developed simple remote command processing with TCP and UDP. These examples show how you can use the .NET networking classes for networking and what the differences are in using the TCP and UDP classes. These differences are caused by the different natures of the protocols. TCP is a connection- and stream-oriented client/server protocol. So, the .NET TCP classes reflect the client/server model by providing client and server classes. Clients have methods for connecting to and disconnecting from a remote host. Servers have methods for listening for and accepting incoming connections.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Teleconferencing and Webcast Services
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.