当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

台北科技大学:《计算机网络》(英文版) NP04 16 Socket API

资源类别:文库,文档格式:PPT,文档页数:49,文件大小:265.5KB,团购合买
Introduction Loosely specified protocol software interface Interface functionality Conceptual interface specification · System calls Two basic approaches to network communication Basic I/ functions in Linux
点击下载完整版文档(PPT)

Socket api Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN CS旧E.NTUT. TAWAN

CSIE, NTUT, TAIWAN 1 Socket API Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

Introduction Loosely specified protocol software interface Interface functionality Conceptual interface specification System calls Two basic approaches to network communication Basic lo functions in linux Using Linux l/o with TCP/IP CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 2 Introduction • Loosely specified protocol software interface • Interface functionality • Conceptual interface specification • System calls • Two basic approaches to network communication • Basic I/O functions in Linux • Using Linux I/O with TCP/IP

Loosely Specified Protocol TCP/IP protocol software resides in Os Routines in os for the interface between the applications and protocol are known as Application Program Interface(APl CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 3 Loosely Specified Protocol • TCP/IP protocol software resides in OS • Routines in OS for the interface between the applications and protocol are known as Application Program Interface (API)

Loosely Specified Protocol TCP/P designers design to operate in a multi-vendor environment avoid choosing any vendor's internal data representation avoid specifying the interface in terms of features available only on a single vendors Os The interface between TCP/IP and application is loosely specified CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 4 Loosely Specified Protocol • TCP/IP designers – design to operate in a multi-vendor environment – avoid choosing any vendor’s internal data representation – avoid specifying the interface in terms of features available only on a single vendor’s OS • The interface between TCP/IP and application is loosely specified

Loosely Specified Protocol Advantages Flexibility Tolerance Disadvantage designer can make the interface details different for each OS CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 5 Loosely Specified Protocol • Advantages – Flexibility – Tolerance • Disadvantage – designer can make the interface details different for each OS

Loosely Specified Protocol Only a few apls exist that permit an application to use TCP/IP protocol UNIX: socket APL, socket interface, or sockets MS Window: window sockets aT&T: acronym TLI CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 6 Loosely Specified Protocol • Only a few APIs exist that permit an application to use TCP/IP protocol – UNIX: socket API, socket interface, or sockets – MS Window: window sockets – AT&T: acronym TLI

TCP/IP Interface Functionality allocate local resources for communication Specify local and remote communication endpoints Initiate a connection(client) Send a datagram(client) Wait for an incoming connection(server) Send or receive data Determine when data arrives Generate urgent data CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 7 TCP/IP Interface Functionality • Allocate local resources for communication • Specify local and remote communication endpoints • Initiate a connection (client) • Send a datagram (client) • Wait for an incoming connection (server) • Send or receive data • Determine when data arrives • Generate urgent data

TCP/IP Interface functionality Handle incoming urgent data Terminate a connection gracefully Handle connection termination from the remote site abort communication Handle error conditions or a connection abort Release local resource when communication finishes CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 8 TCP/IP Interface Functionality • Handle incoming urgent data • Terminate a connection gracefully • Handle connection termination from the remote site • Abort communication • Handle error conditions or a connection abort • Release local resource when communication finishes

Conceptual Interface Specification The conceptual interface defined by the TCP/IP standards does not specify data representations or programming details; it merely provides an example of one possible API that an operation system can offer to application programs that use TCP/IP oS designers are free to implement as long as the functionality holds CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 9 Conceptual Interface Specification • The conceptual interface defined by the TCP/IP standards does not specify data representations or programming details; it merely provides an example of one possible API that an operation system can offer to application programs that use TCP/IP • OS designers are free to implement as long as the functionality holds

System Calls Mechanism that most operating systems use to transfer control between an applications and the operating system procedures Like function calls(for a programmer) CSIE NTUT TANAN

CSIE, NTUT, TAIWAN 10 System Calls • Mechanism that most operating systems use to transfer control between an applications and the operating system procedures • Like function calls (for a programmer)

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共49页,可试读17页,点击继续阅读 ↓↓
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有