O'Reilly logo

TCP/IP Sockets in C# by Kenneth L. Calvert, Michael J. Donahoo, David Makofske

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2 Basic Sockets

You are now ready to learn to write your own socket applications in C#. One of the advantages of the C# programming language is its use of Microsoft’s .NET framework, which provides a powerful library of APIs for programming. Among the class libraries provided are the System.Net and System. Net. Sockets namespaces, and most of this book is dedicated to how to use the socket APIs provided there. In this chapter we begin by demonstrating how C# applications identify network hosts. Then, we describe the creation of TCP and UDP clients and servers. The .NET framework provides a clear distinction between using TCP and UDP, defining a separate set of classes for both protocols, so we treat each separately. Finally, we discuss ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required