Socket API Specifying a protocol Interface Socket abstraction Specifying an Endpoint Address Address structure Major system calls Integer Conversion embolic Constants CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 16 Socket API • Specifying a Protocol Interface • Socket Abstraction • Specifying an Endpoint Address • Address Structure • Major System Calls • Integer Conversion • Symbolic Constants
Specifying a protocol Interface Two approaches when designing functions to OS that provide applications to access TCP/IP protocols Specific functions for TCP/IP communication Flexible functions in general with parameters to spec °上 Xample First approach may use maketcpconnection The other may use makeconnection with a parameter to specify the TCP protocol CSIE NTUT TANAN
CSIE, NTUT, TAIWAN 17 Specifying a Protocol Interface • Two approaches when designing functions to OS that provide applications to access TCP/IP protocols – Specific functions for TCP/IP communication – Flexible functions in general with parameters to specify • Example: – First approach may use maketcpconnection – The other may use makeconnection with a parameter to specify the TCP protocol