Review of Quiz 2 Topics: Encoding in Python, Binary Representations, and Parsing Messages

Slide Note
Embed
Share

Today's session covered a review of Quiz 2 topics focusing on Encoding in Python, Binary Representations, and Parsing Messages. Key points included understanding why different types of data cannot have unique types in Python, recognizing the significance of 0d0a in HTTP body, discussing exercises from class, and preparing for upcoming quizzes. Various muddiest points were addressed and resources on TCP implementations and lab-related queries were shared.


Uploaded on Sep 19, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. CS2911 Week 3, Class 3 (And wk4-c1) Today Quiz 2 Review Muddiest Point Questions on Lab 4? The HTTP protocol, continued Muddiest Point Thursday Friday (tomorrow) Quiz 2: Encoding in Python CS2911 Dr. Yoder 1

  2. Quiz 2 today! Topics: Encoding in Python Binary representations Parsing messages CS2911 Dr. Yoder 2

  3. Muddiest Point 3-2 && 3-3 Why can't the different types of data have unique types in Python? Doesn't it force checks for the actual type something is? And doesn't it force some amount of try/catch to prevent data type mistmatches. NO MORE DAD JOKES Does 0d0a signify a new portion of the response every time it is found in the byte dump? i.e. Can the body portion have multiple lines? Are we going to be working on this exercise we got today in class next time? Will Monday's quiz be mostly about coding bytes in Python? What practice/study would you recommend to supplement class work? Encoding in Python: Why multiple types? re jokes 0d0a in HTTP body Exercise Quiz study advice 3

  4. Muddiest Point 3-2 && 3-3 how do you know which thing in wireshark to check. after you filter theres the list I wish we could have done some of the examples from the practice quiz together as a class. instead of you telling us how, but us not knowing if we are 100% right No muddy points today The punchline often arrives before the set-up. Do you know the problem with UDP jokes? Large discussion: http://stackoverflow.com/questions/152457/what-is- the-difference-between-a-port-and-a-socket Wireshark & HTTP examples and answers none joke Port vs. Socket CS2911 Dr. Yoder 4

  5. Port vs. Socket See text, section 3.2 (7th ed) A socket is like a door through which data passes. A port number is like the number on the door A socket is an object in the running program that you can use to send and receive data (or, in the case of a listening port, to accept a new connection) A port number is just a number the address of the program within the machine "Port" is just an abbreviation of "port number" 5

  6. Questions about Lab 4? TCP implementation? Extension to sending multiple files? Lab checklist / requirements? CS2911 Dr. Yoder 6

  7. TCP connection listen_socket.bind((listen_host,listen_port)) What python type is (listen_host,listen_port)? listen_host can be empty string ('') to listen on all interfaces department offices example Instead of data_socket.recv( ), simply use the next_byte calls you already have in your Lab 3 code. CS2911 Dr. Yoder 7

  8. Marking the end of the message Content-Length Gives length from start Chunking Doesn't say message is done until end Sender doesn't have to know length until done Receiver must parse multiple "chunks" Sender must know length from start Simpler to receive CS2911 Dr. Yoder 8

  9. CS2911 Dr. Yoder 9

  10. Acknowledgement This course is based on the text Computer Networking: A Top Down Approach 7th edition Jim Kurose, Keith Ross Addison-Wesley 10

Related


More Related Content