• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/25

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

25 Cards in this Set

  • Front
  • Back
socket API
Socket Application Programming Interface.
Stream Paradigm
stream denotes a paradigm in which a sequence of bytes flows from one application program to another. Internet's mechanism arranges two streams between a pair of communicating applications, one in each direction. It does not guarantee that the chunks of bytes passed to a receiving application correspond to the chunks of bytes transferred by the sending application.
Message Paradigm
It allows unicast, multicast, or broadcast delivery. Does not make any guarantees about the order in which the messages are delivered or whether a given message will arrive.
Connection-oriented
The service operates analogous to a telephone call: before they can communicate, two applications must request that a connection be created.
Client-Server Model
A form of interaction known as the client-server model. One application, known as a server, starts first and waits contect. The other application, known as a client, start second and initiates the connection.
Internet
Although it povides basic communication, the Internet does not initiate contact with, or accept contact from, a remote computer; application programs known as a clients and servers handle all services.
Server
Formally, the term refers to a program that waits passively for communication, and not to the computer on which it executes. However, when a computer is dedicated to running one or more server programs, the computer itself is sometimes called a server.
Client
Typically, a client sends a request to a server, and the server returns a response to the client.
Multiple Clients and Multiple Servers
Computers can run multiple applications at the same time. 1) single client 2) single server 3) Multiple copies of a client that contact a given server. 4) Multiple clients that each contact a particular server. 5) Multiple servers, each for a particular service.
Identifying A Computer
Each computer in the Internet is assigned a unique 32-bit identifier known as an Internet Protocol Addres (IP Adrress).
Domain Name System (DNS)
Makes server identification easy for the humans, each comptuer is also assigned a DNS.
Identifying A Service
Each service available in the Internet is assigned a unique 16-bit identifier known as a Protocol Port Number (port number). Email = port number 25. Web = port number 80.
Concurrent Servers
A server uses more than one thread of control to handle multiple clients at the same time.
peer-to-peer (p2p)
data is distributed equally among a set of N servers, and each client request is sent to the appropriate server. Because a given server only provides 1/N of the data, the amount of traffic betwee a server and the Internet is 1/N as much as in the single-server architecture.
Application Program Interface (API)
The interface an application uses to specify communication
I/O socket
Applications can use the read and write operations for socket I/O or I/O to a file. When an application creates a socket, the operating system returns a small integer descriptor tha the application uses to reference the socket.
Advantages of Sockets
Advantage of the socket approach is that most functions have three or fewer parameters; the disadvantage is that a programmer must remember to call multiple functions when using sockets.
Protofamily
specifies the protocol family to be used with the socket.
getpeername
Server command used to obtain the address of the remote client that initiated the connection
gethostname
Client or server command used to obtain information about the comptuer on which it is running.
setsockopt
stores values in a socket's options
getsockopt
obtain current option values.
gethostbyname
returns the Internet address for a comptuer given the computer's name
gethostbyaddr
given an IP address for a computer, it returns the computer's name.
socket reference count
mechanism to control each socket. When a socket is first created, the system sets the socket's reference count to 1, and the socket exists as long as the reference count remains positive. When a program creates an additional thread, the thread inherits a pointer to each open socket the program owns, and the system increments the reference count of each socket by 1. When a thread calls close, the system decremetns the reference count for the socket: if the reference count has reached zero, the socket is removed.