1 / 21

網路程式設計 ( 同步教學 )

網路程式設計 ( 同步教學 ). 20131101. 議程. 準備 上課點名 破冰活動 發展 教學目標 期中考範圍 期中考當天 綜合 助教提問 VS. 提問問題 本日總結. 點名. 破冰活動. 提供者:黃昭隆、郭惠民. 1.UDP client 傳送資料使用什麼函式庫指令 (A) sendto (B)recv (C) bind (D)recvfrom (E)socket 2.UDP Server Port binding 用什麼函式庫指令 (A) sendto (B)recv (C) bind (D)recvfrom (E)socket.

Download Presentation

網路程式設計 ( 同步教學 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 網路程式設計(同步教學) 20131101

  2. 議程 • 準備 • 上課點名 • 破冰活動 • 發展 • 教學目標 • 期中考範圍 • 期中考當天 • 綜合 • 助教提問VS.提問問題 • 本日總結

  3. 點名

  4. 破冰活動 提供者:黃昭隆、郭惠民 • 1.UDP client 傳送資料使用什麼函式庫指令 • (A) sendto (B)recv (C) bind (D)recvfrom (E)socket • 2.UDP Server Port binding 用什麼函式庫指令 • (A) sendto (B)recv (C) bind (D)recvfrom (E)socket

  5. 2.連連看 (右邊的通訊協定,各屬於左邊OSI中的哪一層? 提供者:吳文義、劉炎敦 Application Layer SIP Presentation Layer SCTP Session Layer TCP Transport Layer Network Layer UDP Data Link Layer IP Physical Layer

  6. 教學目標 • 教材第三章節的相關學習 • 3.1 General Issues • 3.2 Elementary UDP Socket Functions • 3.3 UDP Client/Server Example • 教材第四章節的相關學習 • 4.1 General Issues • 4.2 SCTP Feature • 4.3 Elementary SCTP Socket Functions

  7. 期中考範圍 • 非同步教材(CH1~CH5前半段) • 同步教學課程 • 10/18 同步課程 • 11/01 同步課程 • 第一次面授課程

  8. 期中考當天 • 期中考試時間 • 2013/11/16(星期六) 地點:309教室 • 時間:9:30(AM)~10:30(AM) • 期末專題提案 • 小組編號 • 專題題目及說明

  9. Review of Transport Layer Services • Connection-Oriented Transport Services • Transmission Control Protocol (TCP) • Stream Control Transmission Protocol (SCTP) • Connectionless Transport Services • User Datagram Protocol (UDP)

  10. User Datagram Protocol (UDP) • UDP provides an unreliable, connectionless service to the invoking application • No handshaking between sending and receiving transport layer entities before sending data segments • UDP is defined in RFC 768 (http://www.ietf.org/rfc/rfc0768.txt) • UDP-based Internet Services/Applications: DNS, SNMP, RIP, Internet Telephony

  11. Comparison of UDP and TCP Segments

  12. Categories of UDP Sockets’ Functions

  13. Operations of UDP Client/Server

  14. Operations of SCTP Client/Server

  15. Comparison of TCP and UDP Socket Data Sending and Receiving

  16. Socket library • listen() • bind() • connect() • accept() • socket() • send() • recv()

  17. Comparison of TCP and UDP Socket Data Sending andReceiving send( SOCKET s, const void *buf, int len, int flags) recv( SOCKET s, void *buf, int len, int flags) sctp_sendmsg( int s, const void *msg, size_t len, struct sockaddr *to, socklen_t tolen, uint32_t ppid, uint32_t flags, uint16_t stream_no, uint32_t timetolive, uint32_t context); sctp_recvmsg( int s, void *msg, size_t len, struct sockaddr *from, socklen_t *fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags) sendto( int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) recvfrom( int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)

  18. DEMO • UDP • SCTP

  19. 助教提問 • 助教提問: • TCP提供可靠的傳輸服務,那為什麼還是需要UDP? • 請問如果單筆資料量(UDP datagram)超過一MTU ,如何透過 IP protocol 來傳送?

  20. 提問問題

  21. 本日總結

More Related