Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network Programming (3)

Similar presentations


Presentation on theme: "Network Programming (3)"— Presentation transcript:

1 Network Programming (3)
CSE 132

2 iClicker/WUTexter Question
How many of the following IP addresses are properly formed (i.e., legal IP addresses)? A: 1 B: 2 C: 3 D: 4 E: 5 @wucse132 <letter> XX

3 Today’s Outline Observability Protocols

4 Observability What is really going on?
Option 1: stare at the code until inspired When that doesn’t work, make random change Option 2: don’t assume the code you actually wrote does what you think it does! Alter code so that you discover what it really does PCS system is great for this What about network code? Is issue on client or server?

5 Observability for Network Code
Need to know what is really going across the network On server, client, or maybe both: Display what is going out the output stream Display what is coming in the input stream Support multiple interpretations of the raw data Studio 7 today is about building these tools Do a good job and it will help you the rest of the semester!

6 Protocols What is poor about the Lab W protocol? At least 3 things:
Inefficient use of network bandwidth (verbose) Uninformative response(s) in the case of an error Poor recovery from client mistake

7 Better Protocols What might I do about these protocol weaknesses?
Use shorter command names Provide return error codes or strings Start all msgs with magic number Insert ‘!’ (ASCII 33) as magic number up front

8 iClicker/WUTexter Question
What is wrong with the message below? Nothing is wrong, the message is fine The first character is not the “magic number” The count should be least significant digit first The count is in decimal format Characters take 2 bytes each in Java @wucse132 <letter> XX


Download ppt "Network Programming (3)"

Similar presentations


Ads by Google