html5-img
1 / 18

Network Programming

Network Programming. All networked computers have an IP Address Unique In the form of xxx.xxx.xxx.xxx (255.255.255.255) 32 bits = ~4 billion possibilities (IPv4) Most computers have multiple network cards called “interfaces” Wireless card Ethernet adapter VPN. From the cmd. Ports.

trang
Download Presentation

Network Programming

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. Network Programming • All networked computers have an IP Address • Unique • In the form of xxx.xxx.xxx.xxx (255.255.255.255) • 32 bits = ~4 billion possibilities (IPv4) • Most computers have multiple network cards called “interfaces” • Wireless card • Ethernet adapter • VPN

  2. From the cmd

  3. Ports • Machine can specify one of ~65K ports • Allows for multiple network connections • First 1024 are reserved by the OS • Common ports • 21 FTP (File Transfer Protocol) • 22 SSH (Secure Shell) • 23 Telnet • 25 SMTP (Simple Mail Transfer Protocol) • 80 HTTP (HyperText Transfer Protocol) • 110 POP3 (Post Office Protocol) ** 13 is Time Protocol and 17 is Quote of the Day

  4. DNS • Domain Name Service • Translates human-readable into IP Address • Relieves burden of memorization! • This is what many applications use • Example: • www.google.com • 74.125.47.106

  5. nslookup

  6. Client/Server • Servers wait – a LOT • Client wants some data/service from server • Process • Client connects to server • Client sends request for info • Server finds the information • Server sends the information • Client/Server disconnect?

  7. “One-shot” Servers

  8. “One-shot” Servers Gee, I’m lonely I need a texture!

  9. “One-shot” Servers Someone loves me! Make a connection

  10. “One-shot” Servers Let me find that for you… GET spriteSheet.png

  11. “One-shot” Servers Here ya go! <DATA>

  12. “One-shot” Servers Gee, I’m lonely

  13. “Broadcast” Servers A B C

  14. “Broadcast” Servers A B C One thread per client

  15. “Broadcast” Servers Here are my coordinates! A <375.0, -41.0> B C

  16. “Broadcast” Servers Hey guys! “A” has moved A “A” is at <375.0, -41.0> B “A” is at <375.0, -41.0> C

  17. Summary • IP Address • Port • Client/Server relationship • Programming: • If you can read/write to files, you can read/write to the network • Developing “Poor Man’s Web Browser” • Developing “Poor Man’s Web Server”

More Related