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