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

  3. Listening Sockets

  4. Accepting Client Connections

  5. Closing the Server

  6. Socket Security

  7. Sharing Ports

  8. Socket Permissions

  9. Set socket permissions

  10. A Simple C# Asynchronous Class Example

  11. A Simple VB .NET Asynchronous Class Example

  12. C# Asynchronous Server Program Example

  13. VB .NET Asynchronous Server Program Example

  14. C# Asynchronous Client Program Example

  15. VB .NET Asynchronous Client Program Example

  16. Asynchronous Socket Operations

  17. Posting Asynchronous Operations

  18. Asynchronous Accept

  19. Asynchronous Connect

  20. Asynchronous Data Transfer

  21. 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 >