Imagine preview
(7/10 din 3 voturi)

Acest curs prezinta Sockets.
Mai jos poate fi vizualizat un extras din document (aprox. 2 pagini).

Arhiva contine 1 fisier doc de 15 pagini .

Iti recomandam sa te uiti bine pe extras si pe imaginile oferite iar daca este ceea ce-ti trebuie pentru documentarea ta, il poti descarca.

Fratele cel mare te iubeste, acest download este gratuit. Yupyy!

Domenii: Calculatoare, Automatica, Inteligenta Artificiala

Extras din document

The Socket API


• Protocols do not typically specify API

• API defined by programming system

• Allows greatest flexibility - compatibility with different programming systems

• Socket API is a specific protocol API

o Originated with Berkeley BSD UNIX

o Now available on Windows 95 and Windows NT, Solaris, etc.

• Not defined as TCP/IP standard; de facto standard


Sockets and socket libraries


• BSD UNIX includes sockets as system calls

• Some systems have different API

o Adding sockets would require changing OS

o Added library procedures - socket library - instead

• Adds layer of software between application and operating system

o Enhances portability

o May hide native API altogether

Sockets and UNIX I/O


• Developed as extension to UNIX I/O system

• Uses same file descriptor address space (small integers)

• Based on open-read-write-close paradigm

o open - prepare a file for access

o read/write - access contents of file

o close - gracefully terminate use of file

• Open returns a file descriptor, which is used to identify the file to read/write/close


The socket API


• Socket programming more complex than file I/O

• Requires more parameters

o Addresses

o Protocol port numbers

o Type of protocol

o New semantics

• Two techniques

o Add parameters to existing I/O system calls

o Create new system calls

• Sockets use a collection of new system calls

Fisiere in arhiva (1):

  • Sockets.doc