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

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

资源类别:文库,文档格式:PPT,文档页数:54,文件大小:336.5KB,团购合买
How applications become clients by initiating communication How applications use TCP or UDP protocols to contact a server How they use socket calls to interact with the protocols CSIE, NTUT, Taiwan
点击下载完整版文档(PPT)

Client Software Design Algorithms and Issues Chuan-Ming liu Computer Science and Information Engineering Spring 2004, NTUt TAIWAN CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 1 Client Software Design Algorithms and Issues Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

Client Software Design a How applications become clients by initiating communication a How applications use TCP or UDP protocols to contact a server How they use socket calls to interact with the protocols CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 2 Client Software Design ◼ How applications become clients by initiating communication ◼ How applications use TCP or UDP protocols to contact a server ◼ How they use socket calls to interact with the protocols

Learning algorithms Instead of Details Learn know-what instead of know -how first a After knowing what to do, finding out how to do is straightforward CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 3 Learning Algorithms Instead of Details ◼ Learn know-what instead of know-how first ◼ After knowing what to do, finding out how to do is straightforward

Client Architecture a Client applications are simpler than server applications No concurrent interaction Most client software executes as a conventional application a Dont need to enforce protection CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 4 Client Architecture ◼ Client applications are simpler than server applications ◼ No concurrent interaction ◼ Most client software executes as a conventional application ◼ Don’t need to enforce protection

Identifying servers location Have the server 's domain name or ip address as constants when program is compiled a Using address makes client software faster and less dependent on local computing environment no flexibility Using a generic name for the server and an alias to the domain name system for that name Improvement Obtain information from stable storage Can not execute program unless the file is available CSIE NTUT Taiwan 5

CSIE, NTUT, Taiwan 5 Identifying Server’s location ◼ Have the server’s domain name or IP address as constants when program is compiled ◼ Using address makes client software faster and less dependent on local computing environment – no flexibility ◼ Using a generic name for the server and an alias to the domain name system for that name – improvement ◼ Obtain information from stable storage ◼ Can not execute program unless the file is available

Identifying servers location a Use a separate protocol to find a server Works in a small. local environment The dynamic property makes additional complexity and broadcast traffic on network Ask users to identify Avoid unnecessary complexity Makes the client software general Eliminates dependency ■ Most flexible Approach taken depends on services CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 6 Identifying Server’s location ◼ Use a separate protocol to find a server ◼ Works in a small, local environment ◼ The dynamic property makes additional complexity and broadcast traffic on network ◼ Ask users to identify ◼ Avoid unnecessary complexity ◼ Makes the client software general ◼ Eliminates dependency ◼ Most flexible ◼ Approach taken depends on services

Parsing an Address Argument a Specify arguments on command line when invoking a client program Each argument consists of a character string a Client uses an argument's syntax to interpret Its meaning ■ Example: Domain name: csie ntut. edu. tw IP address:140.124.180.1 CSIE NTUT Taiwan 7

CSIE, NTUT, Taiwan 7 Parsing an Address Argument ◼ Specify arguments on command line when invoking a client program ◼ Each argument consists of a character string ◼ Client uses an argument’s syntax to interpret its meaning ◼ Example: ◼ Domain name: csie.ntut.edu.tw ◼ IP address: 140.124.180.1

Parsing an Address Argument a Additional information beyond the servers machine, or IP address can also be specified Example: (two arguments) cSie ntut. edu. tw smtp Csie ntut. edu. tw: smtp a Keep consistency with the local system CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 8 Parsing an Address Argument ◼ Additional information beyond the server’s machine, or IP address can also be specified ◼ Example: (two arguments) ◼ csie.ntut.edu.tw smtp ◼ Csie.ntut.edu.tw:smtp ◼ Keep consistency with the local system

Looking up a Domain Name a Client needs to specify the address of a server a There are two forms in address argument ■ Domain name IP address(dotted decimal a Converting IP address to 32-bit binary representation is trivial Converting from a domain name require more effort CSIE NTUT Taiwan

CSIE, NTUT, Taiwan 9 Looking up a Domain Name ◼ Client needs to specify the address of a server ◼ There are two forms in address argument ◼ Domain name ◼ IP address (dotted decimal) ◼ Converting IP address to 32-bit binary representation is trivial ◼ Converting from a domain name require more effort

Looking up a Domain Name a Socket APi includes library routines, inet addr and gethostbyname to perform the conversion ■ inet addr; Takes dotted decimal address(in AScID and returns the ip address in binary a gethostbyname Takes the domain name and returns the address of a hostnet structure containing the Ip address in binary CSIE NTUT Taiwan 10

CSIE, NTUT, Taiwan 10 Looking up a Domain Name ◼ Socket API includes library routines, inet_addr and gethostbyname to perform the conversion ◼ inet_addr: Takes dotted decimal address (in ASCII) and returns the IP address in binary ◼ gethostbyname: Takes the domain name and returns the address of a hostnet structure containing the IP address in binary

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

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

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