Sisteme de Operare - UNIX
Sistemul de fisiere Datele si programele sunt pastrate, ca si in alte sisteme de operare, in...
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
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