textbook review copies
Quick Search      
      
Search
Browse by Topic
Browse by Title
Browse by Author
View Out Of Print
About CRM
Author Guidelines
Contact Us
Distributors
Ordering (20% Off!)
Home
Sign In
Shopping Cart
Request Alerts

BSD Sockets Programming From A Multi-Language Perspective

M. Tim Jones

Table of Contents Sample Chapter Book/CD Update Reviews

BSD Sockets Programming from a Multi-Language Perspective is written for software developers who need to create a variety of network applications. It begins by detailing the efficient and effective uses of the BSD Sockets API for networked application development in multiple languages. From there the BSD API is covered in detail and the purpose of each function and socket option is identified, including the advanced behavioral side-effects of each. Having a thorough understanding of these issues and techniques is often the difference between being a novice and professional network application developer. Optimizing networked applications and avoiding common pitfalls are also addressed.

After the solid foundational coverage of the Sockets API in Part I, Part II investigates it from a variety of language perspectives. Using six different languages in all, including imperative languages (C), object-oriented languages (Java), and scripting languages (Perl), you learn the advantages and disadvantages of each language as they relate to the development of networked applications and the Sockets API.

Finally, in Part III, a set of software patterns is discussed for each language. Patterns include a simple HTTP server and SMTP client, and various Sockets communication styles (stream, datagram, multicast, and broadcast). These patterns can be used as the basis for more complex applications or to give you a quick-start when building networked applications. The patterns also illuminate the differences between the network APIs for each language and identify how certain languages make patterns simple and others make them complex. The accompanying CD-ROM includes all of the source code from the book, including the patterns detailed in Part III, as well as open source interpreters and other tools.

Features

  • Provides in-depth coverage of the Sockets API including behavioral side-effects
  • Offers complete coverage of BSD socket options and their effects on network application
  • Discusses the usage of the Sockets API in a variety of popular languages, including C, Java, Python, Perl, Ruby and Tcl
  • Looks at language specific network programming alternatives
  • Analyzes the implementations of standard software patterns for each of the covered languages, including a simple HTTP server, SMTP client, multicast and broadcast patterns, and more
  • Provides helpful tips on creating efficient network applications and avoiding common pitfalls

On the CD

The CD-ROM is made up of two parts: software and tools. In the software directory are the software patterns and examples for each of the languages. Under tools are the interpreters and tools used with the examples.

  • Software Patterns - Contains 15 subdirectories covering a number of chapters from the book. Code examples from the book are included, as well as the software patterns for Ruby, Tcl, C, Perl, Python, and Java
  • Software Tools - Contains software tools and languages of the versions used in the book. The Perl, Ruby, Tcl, and Python interpreters are included in source form, and executables are provided for Ruby and Python

AUTHOR BIO

M. Tim Jones is an embedded software architect and the author of GNU/Linux Application Programming, AI Application Programming, and BSD Sockets Programming from a Multilanguage Perspective. His engineering background ranges from the development of kernels for geosynchronous spacecraft to embedded systems architecture and networking protocols development. Tim is a Consultant Engineer for Emulex Corp. in Longmont, Colorado.

ISBN 1-58450-268-1
PRICE $49.95
PUB DATE September 2003
FORMAT Paperback/CD (Windows/Linux ) - 441 pages
SYSTEM REQUIREMENTS PC: The minimum system requirements for the tools, patterns, and examples are: Pentium I processor or above; CD-ROM Drive; Hard Drive (350MB available space for tools, 1MB for patterns and examples); 128MB of RAM; The tools and code examples provided in this book require Linux (tested with Red Hat 7.2, but will run any standard distribution) or Windows 95/98, Windows NT, Windows 2000 or Windows XP.


Book/CD Update

There is an error in the code on page 73, listing 4.10

It was missing a '=' (should have been a comparison instead of an assignment). Here is the corrected code:




/*
* resolve.c
*
*/

#include
#include
#include

int resolve_name( struct sockaddr_in *addr, char *hostname )
{
addr->sin_family = AF_INET;

/* See if the hostname actually is a string IP address */
addr->sin_addr.s_addr = inet_addr( hostname );

/* If hostname wasn't a string notation IP address,
* use the gethostbyname function to resolve it.
*/
if ( addr->sin_addr.s_addr == 0xffffffff ) {

struct hostent *hp;

hp = (struct hostent *)gethostbyname( hostname );

/* Don't know what the hostname is... */

if (hp == NULL) return -1;
else {
memcpy( (void *)&addr->sin_addr,
(void *)hp->h_addr_list[0],
sizeof( addr->sin_addr ) );

}

}

return 0;

}

/*

CHARLES RIVER MEDIA
EMail Charles River Media Back to Charles River Media's Homepage ©1996- Charles River MediaAll Rights Reserved
Designed by DaLee & Company, Inc.
Disclaimer