• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,504
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
34
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Huma Chaudhry ME111012 Nima bahrami ME101004 1Huma Chaudhry(ME111012), Nima Bahrami(ME101004)
  • 2. Some Important Terms: socket Stream: a host-local, Listen: Server does the Listening at a port for application-created, you OS-controlled interface Port: 65535 ports (a “door”) into which application process can Socket: a door between application both send and process and end-end- receive messages to/from transport protocol another application (UCP or TCP) process Try-CatchHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 2
  • 3. Overview of Client/Server interaction TCP create socket, port=xyz, for incoming request: welcomeSocket = ServerSocket() TCP create socket, wait for incoming connection request connection setup connect to hostid, port=x clientSocket = connectionSocket = welcomeSocket.accept() Socket() send request using read request from clientSocket connectionSocket write reply to connectionSocket read reply from clientSocket close connectionSocket Close req 3 clientSocket Huma Chaudhry(ME111012), Nima Bahrami(ME101004)
  • 4. controlled by controlled by process application application process developer developer socket socket TCP with TCP with controlled by controlled by buffers, operating operating buffers, internet system system variables variables host or host or server serverHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 4
  • 5. Networking:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 5
  • 6. Sneak Peak into the Code Server Side Client SideHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 6
  • 7. Huma Chaudhry(ME111012), Nima Bahrami(ME101004)Socket programming (server)Passive Listening: 7
  • 8. Socket programming (server) Streams of Data to carry data to/from Client:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 8
  • 9. Socket programming (server) Receiving File from Client:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 9
  • 10. Socket programming (server) Client Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 10
  • 11. Socket programming (server) Server Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 11
  • 12. Client Request for Connection:-Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 12
  • 13. Socket programming: Client Client reaching out to ServerHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 13
  • 14. Client Communication with Server:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 14
  • 15. Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 15
  • 16. Client Side: Client Sending FileHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 16
  • 17. Client Closing Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 17
  • 18. Thanks to TCPHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 18
  • 19. Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 19