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

Multiprotocol Servers Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUt TAIWAN CSIE NTUT Taiwan
1 CSIE, NTUT, Taiwan Multiprotocol Servers Chuan-Ming Liu Computer Science and Information Engineering Spring 2004, NTUT TAIWAN

●●。 Introduction o Single thread for multiple transport protocols o Motivation o Server design and process structure o An iterative example o Concurrent multiprotocol servers SIE NTUT. Taiwan
2 CSIE, NTUT, Taiwan Introduction Single thread for multiple transport protocols Motivation Server design and process structure An iterative example Concurrent multiprotocol servers

●● Motivation o Same service but with different transport protocols, for example, DAYTIME service can via tcp or udp Single protocol server is easy to maintain but results in replication - same service with different protocols may have the same piece of code o Ea ach single protocol server needs its own resource -result in unnecessarily consuming process table entries and system resources SIE NTUT. Taiwan
3 CSIE, NTUT, Taiwan Motivation Same service but with different transport protocols, for example, DAYTIME service can via TCP or UDP Single protocol server is easy to maintain but results in replication – same service with different protocols may have the same piece of code Each single protocol server needs its own resource – result in unnecessarily consuming process table entries and system resources

o Single Thread Multiprotocol o Use asynchronous I/o to handle communication o Initially, open two sockets: one for tCP and the other is for UDP o Then wait for one of the two sockets to be rea e If TCP is ready the server uses accept to make a new connection o If udP is ready, the server uses UDP service to serve the client 4 SIE NTUT. Taiwan
4 CSIE, NTUT, Taiwan Single Thread Multiprotocol Use asynchronous I/O to handle communication Initially, open two sockets: one for TCP and the other is for UDP Then, wait for one of the two sockets to be ready ⚫ If TCP is ready, the server uses accept to make a new connection ⚫ If UDP is ready, the server uses UDP service to serve the client

●●。 Process structure Server Application rocesses Socket for Socket for Sockets for+OS UDP CP a TcP requests requests connections 5 SIE NTUT. Taiwan
5 CSIE, NTUT, Taiwan Process Structure Server OS Application Processes Socket for UDP requests Sockets for a TCP connections Socket for TCP requests

MultiprotOcol DAYTIME ●●● Server o Program daytime.C o Shared code o Single procedure can be used by different protocols ● easy to maintain o In the example function daytime is the Shared code 6 SIE, NTUT, Taiwan
6 CSIE, NTUT, Taiwan Multiprotocol DAYTIME Server Program daytimed.c Shared code ⚫ Single procedure can be used by different protocols ⚫ Easy to maintain ⚫ In the example, function daytime is the shared code

●●● Concurrent Multiprotocol Server o Why using iterative for DAYTIME server o What we had learned for currency can be also extended to implement multiprotocol servers o More protocols and ports number can be foundinrfc1700.http://www.cis.ohio state. edu/cgi-bin/rfc/rfcl700html SIE NTUT. Taiwan
7 CSIE, NTUT, Taiwan Concurrent Multiprotocol Server Why using iterative for DAYTIME server? What we had learned for currency can be also extended to implement multiprotocol servers More protocols and ports number can be found in RFC 1700, http://www.cis.ohiostate.edu/cgi-bin/rfc/rfc1700.html
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 台北科技大学:《计算机网络》(英文版) NP04 16 Client Software Design.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 Socket API.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 15 Client Server model.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 12 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 11 Introduction.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 1 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 0 Network Programming.ppt
- 哈尔滨工业大学:《网络应用开发》英文版 网络开发与应用实验指导书.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter7.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter7-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter6-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter5.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter5-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter4.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter4-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter3.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter3-6.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter2.pdf
- 哈尔滨工业大学:《网络应用开发》英文版 NAD-chapter2-6.pdf
- 台北科技大学:《计算机网络》(英文版) NP04 16 multi services.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 server.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 server ex.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 16 server ex con.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 18.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 2 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 20(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 20.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 21(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 22(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 23(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 24(comer).ppt
- 台北科技大学:《计算机网络》(英文版) NP04 27 Mobile ip discussion overview.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 28 Real-Time Transport protocol.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 3 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 4 CONTENTS.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 5 Subnetting.ppt
- 台北科技大学:《计算机网络》(英文版) NP04 8 Internet Protocol (IP).ppt
- 《计算机图形学》课程教学资源:第3章 图形的基本运算.ppt
- 《计算机图形学》课程教学资源:第4章 图形的观察运算.ppt