Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
2Activity

Table Of Contents

Introduction
Key Terms and Concepts
How You Can Use BSD Sockets
The Client-Server Model
Creating a Connection: the Client-Server Model
BSD Sockets Library Routines
Overview
Preparing Address Variables
Declaring Socket Address Variables
Using a Wildcard Local Address
Writing the Server Process
Creating a Socket
Binding a Socket Address to the Server Process's Socket
Setting Up the Server to Wait for Connection Requests
Accepting a Connection
Writing the Client Process
Requesting a Connection
Flag Options
Closing a Socket
Example Using Internet Stream Sockets
Socket Options
Getting and Setting Socket Options
SO_REUSEADDR
SO_KEEPALIVE
SO_DONTROUTE
SO_SNDBUF
SO_RCVBUF
SO_LINGER
SO_USELOOPBACK
SO_OOBINLINE
SO_SNDLOWAT
SO_RCVLOWAT
SO_SNDTIMEO
SO_RCVTIMEO
SO_TYPE
SO_ERROR
SO_BROADCAST
SO_REUSEPORT
Synchronous I/O Multiplexing with Select
Sending and Receiving Data Asynchronously
Using Shutdown
When to Shut Down a Socket
Using Read and Write to Make Stream Sockets Transparent
Using Read and Write to Make Stream Sockets Transparent
Sending and Receiving Out-of-band Data
Getting the Remote Host's Network Address
Writing the Server and Client Processes
Creating Sockets
Binding Socket Addresses to Datagram Sockets
Sending and Receiving Messages
Sending Messages
Receiving Messages
Example Using Datagram Sockets
SO_BROADCAST Socket Option
Specifying a Default Socket Address
When to Specify a Default Socket Address
Synchronous I/O Multiplexing with Select
Sending and Receiving Data Asynchronously
Sending and Receiving IP Multicast Datagrams
Sending IP Multicast Datagrams
Receiving IP Multicast Datagrams
Using Broadcast Addresses
Setting the Server Up to Wait for Connection Requests
Example Using UNIX Domain Stream Sockets
Binding Socket Addresses to UNIX Domain Datagram Sockets
Example Using UNIX Domain Datagram Sockets
Troubleshooting
Using Diagnostic Utilities as Troubleshooting Tools
Using Diagnostic Utilities as Troubleshooting Tools
Adding a Server Process to the Internet Daemon
Summary Tables for System and Library Calls
Portability Issues
Porting Issues for IPC Functions and Library Calls
Quick Reference Table
0 of .
Results for:
No results containing your search query
P. 1
Bsd Sockets Programming

Bsd Sockets Programming

Ratings: (0)|Views: 12 |Likes:
Published by alisssa

More info:

Published by: alisssa on Oct 25, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/01/2013

pdf

text

original

You're Reading a Free Preview
Pages 4 to 31 are not shown in this preview.
You're Reading a Free Preview
Pages 35 to 42 are not shown in this preview.
You're Reading a Free Preview
Pages 46 to 75 are not shown in this preview.
You're Reading a Free Preview
Pages 79 to 130 are not shown in this preview.
You're Reading a Free Preview
Pages 134 to 196 are not shown in this preview.

Activity (2)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->