Chapter 7: Optimizing Sockets Applications

 < Day Day Up > 



In this chapter, we investigate a variety of topics that provide mechanisms to increase the efficiency and performance of Sockets applications. Many of these methods take advantage of a basic understanding of the Sockets API, whereas others utilize and understand the networking architecture and communication principles. Finally, other methods take advantage of specialized features of TCP/IP stacks.

Introduction

A number of disparate topics are discussed in this chapter, each useful whether or not performance is an important aspect of the Sockets application. The optimized Sockets programming topics that are discussed in this chapter include:

  • Ensuring full-sized segments

  • Optimizing the send and receive buffer sizes

  • Minimizing latency with TCP_NODELAY

  • Reading/writing all available data

  • Advantages and disadvantages to select

  • Using multiple sockets

  • Separating control and data connections

  • Using stack callbacks

  • Using zero-copy buffer functions

  • Using UDP instead of TCP

  • Stack selection

  • Stack configuration



 < Day Day Up > 



BSD Sockets Programming from a Multi-Language Perspective
Network Programming for Microsoft Windows , Second Edition (Microsoft Programming Series)
ISBN: 1584502681
EAN: 2147483647
Year: 2003
Pages: 225
Authors: Jim Ohlund

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net