中国高校课件下载中心 》 教学资源 》 大学文库

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

文档信息
资源类别:文库
文档格式:PPT
文档页数:23
文件大小:115KB
团购合买:点击进入团购
内容简介
Examples Iterative, Connectionless Server (UDP) Iterative, Connected-Oriented Server (TCP) Concurrent. Connection-Oriented Server(TCP)
刷新页面文档预览

Server software design Examples Chuan-Ming LIu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN CSIE NTUT Taiwan

1 CSIE, NTUT, Taiwan Server Software Design Examples Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

●● Examples o Iterative, Connectionless Server (UDP) o Iterative. Connected-Oriented server (TCP) o Concurrent Connection-Oriented Server(tCp) SIE NTUT. Taiwan

2 CSIE, NTUT, Taiwan Examples  Iterative, Connectionless Server (UDP)  Iterative, Connected-Oriented Server (TCP)  Concurrent, Connection-Oriented Server (TCP)

Iterative Connectionless Server (UDP)

Iterative, Connectionless Server (UDP)

●。 Creating Passive Socket o To hide the allocation of socket use o passiveudP(passiveUDP C passiverCP(passivercPC two high-level procedures o Both procedures call passivesocko to perform socket allocation passivesock.C 4 SIE NTUT. Taiwan

4 CSIE, NTUT, Taiwan Creating Passive Socket  To hide the allocation of socket, use ⚫ passiveUDP (passiveUDP.c) ⚫ passiveTCP (passiveTCP.c) two high-level procedures  Both procedures call passivesock() to perform socket allocation – passivesock.c

●●● Port Privilege o To use well-known services(lower port number), the server process needs special privilege o lwo servers on a given computer can not use the same port number at the same time o How to overcome the port privilege? ● Using portbase 5 SIE NTUT. Taiwan

5 CSIE, NTUT, Taiwan Port Privilege  To use well-known services (lower port number), the server process needs special privilege  Two servers on a given computer can not use the same port number at the same time  How to overcome the port privilege? ⚫ Using portbase

●。 Portbase o Programmer does not need to modify all references to port numbers- safety o Solves the problem in general way generality o Solving the possible port conflicts-no conflicts 6 SIE, NTUT, Taiwan

6 CSIE, NTUT, Taiwan Portbase  Programmer does not need to modify all references to port numbers – safety  Solves the problem in general way – generality  Solving the possible port conflicts – no conflicts

●●。 Process structure server AP Socket at well-known port+OS used for all communication SIE, NTUT, Taiwa

7 CSIE, NTUT, Taiwan Process Structure server OS AP Socket at well-known port used for all communication

●。 Example o The uDPtimed. c example SIE, NTUT, Taiwa

8 CSIE, NTUT, Taiwan Example  The UDPtimed.c example

Iterative Connection Oriented Server (UDP)

Iterative, Connection￾Oriented Server (UDP)

●。 Creating Passive Socket o Use passivercp ( to allocate a stream socket and bind it to the well- known port o Two arguments in passiveTCP ● Name of service o Size of the queue for requests 10 SIE NTUT. Taiwan

10 CSIE, NTUT, Taiwan Creating Passive Socket  Use passiveTCP() to allocate a stream socket and bind it to the well￾known port  Two arguments in passiveTCP: ⚫ Name of service ⚫ Size of the queue for requests

共23页,试读已结束,阅读完整版请下载
刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档