Huma Chaudhry                              ME111012       Nima bahrami                               ME101004             ...
Some Important                                                     Terms:                                                 ...
Overview of Client/Server interaction                TCP    create socket,    port=xyz, for    incoming request:  welcomeS...
controlled by     controlled by                                           process     application       application       ...
Networking:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   5
Sneak Peak into the Code                                                      Server Side                                 ...
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)Socket programming (server)Passive Listening:                     7
Socket programming (server)                   Streams of Data to carry data to/from Client:Huma Chaudhry(ME111012), Nima B...
Socket programming (server)                     Receiving File from Client:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)...
Socket programming (server)             Client Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   10
Socket programming (server)             Server Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   11
Client Request for Connection:-Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   12
Socket programming: Client   Client reaching out to ServerHuma Chaudhry(ME111012), Nima Bahrami(ME101004)   13
Client Communication with Server:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   14
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   15
Client Side:                                      Client Sending FileHuma Chaudhry(ME111012), Nima Bahrami(ME101004)   16
Client Closing Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   17
Thanks to TCPHuma Chaudhry(ME111012), Nima Bahrami(ME101004)   18
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   19
Upcoming SlideShare
Loading in …5
×

TCP file upload server client example

3,947 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,947
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
42
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

TCP file upload server client example

  1. 1. Huma Chaudhry ME111012 Nima bahrami ME101004 1Huma Chaudhry(ME111012), Nima Bahrami(ME101004)
  2. 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. 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. 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. 5. Networking:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 5
  6. 6. Sneak Peak into the Code Server Side Client SideHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 6
  7. 7. Huma Chaudhry(ME111012), Nima Bahrami(ME101004)Socket programming (server)Passive Listening: 7
  8. 8. Socket programming (server) Streams of Data to carry data to/from Client:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 8
  9. 9. Socket programming (server) Receiving File from Client:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 9
  10. 10. Socket programming (server) Client Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 10
  11. 11. Socket programming (server) Server Terminating Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 11
  12. 12. Client Request for Connection:-Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 12
  13. 13. Socket programming: Client Client reaching out to ServerHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 13
  14. 14. Client Communication with Server:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 14
  15. 15. Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 15
  16. 16. Client Side: Client Sending FileHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 16
  17. 17. Client Closing Connection:Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 17
  18. 18. Thanks to TCPHuma Chaudhry(ME111012), Nima Bahrami(ME101004) 18
  19. 19. Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 19

×