Chapter 9

Server or Listening Sockets Programming

 

 

 

COMPLETED PROJECT DOWNLOAD

What do we have in this chapter?

  1. Intro To Server Socket

  2. Server Creation

    Listening Sockets

    Accepting Client Connections

    Closing the Server

    Socket Security

    Sharing Ports

    Socket Permissions

    Set socket permissions

  3. A Simple C# Asynchronous Class Example

  4. A Simple VB .NET Asynchronous Class Example

  5. C# Asynchronous Server Program Example

  6. VB .NET Asynchronous Server Program Example

  7. C# Asynchronous Client Program Example

  8. VB .NET Asynchronous Client Program Example

  9. Asynchronous Socket Operations

  10. Posting Asynchronous Operations

    Asynchronous Accept

    Asynchronous Connect

    Asynchronous Data Transfer

    Canceling Pending Asynchronous Operations

 

 

Summary

 

This chapter will introduce the basics of creating a connection-oriented server socket that handles client requests. It also discusses the importance of socket security for servers and gave an introduction to the asynchronous Socket methods. Server sockets should always set the ExclusiveAddressUse option to ensure that no other socket can bind to the same interface. Also, robust servers should use asynchronous I/O to efficiently use resources. We will also see that asynchronous socket I/O is not much more difficult than blocking I/O. The next chapter will introduce the .NET Framework classes that deal with the HTTP protocol, and in Chapter 14, we’ll discuss what can be done to ensure high performance with .NET Framework–based networking.

 

 

 

 

 

HOME

 

 

 

Custom Search
< Client Sockets | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | HTTP With .NET >