Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changes between Version 20 and Version 21 of ChapterNetworking

Show
Ignore:
Author:
JJR (IP: 207.194.36.67)
Timestamp:
12/02/07 15:54:05 (16 years ago)
Comment:

fix

Legend:

Unmodified
Added
Removed
Modified
  • ChapterNetworking

    v20 v21  
    4747Before we can create a socket, we will need to describe how it will be used and how it will communicate with another socket. Most network programs use maybe one or two types of sockets for the majority of tasks, but flexibility demands that many options be available to the programmer.  Therefore, during creation of a socket, we need to specify several socket features that define how we will later communicate through the socket.  There are three types of attributes to set:   
    4848 
    49  * the address family 
    50  * the socket type  
    51  * the protocol type 
     49 * address family 
     50 * socket type  
     51 * protocol type 
    5252 
    5353The address family describes how all communication points or nodes will be addressed or accessed through the new socket.  For example, if we create a socket with !AddressFamily.INET, then all communications through the socket are expected to use a 32-bit internet address (eg. 127.0.0.1) and a 16-bit port number. Using !AddressFamily.UNIX means that we expect to communicate through the socket using a local UNIX file path descriptor as an address.  Here is a list of address family's provided by the Tango Socket: