SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Huma Chaudhry                              ME111012

       Nima bahrami                               ME101004
                                                         1
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)
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-Catch

Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   2
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)
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                       server
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)       4
Networking:




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   5
Sneak Peak into the Code



                                                      Server Side

                                                      Client Side




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   6
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 Bahrami(ME101004)   8
Socket programming (server)
                     Receiving File from Client:




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)    9
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 Server




Huma 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 File




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   16
Client Closing Connection:




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   17
Thanks to TCP




Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   18
Huma Chaudhry(ME111012), Nima Bahrami(ME101004)   19

Weitere ähnliche Inhalte

Was ist angesagt?

ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESS
ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESSĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESS
ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESSnataliej4
 
Bai Thuc hanh DNS
Bai Thuc hanh DNSBai Thuc hanh DNS
Bai Thuc hanh DNSnp_thanh
 
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...sunflower_micro
 
Tienmarketingonline design pringting_ creative_ brief
Tienmarketingonline design pringting_ creative_ briefTienmarketingonline design pringting_ creative_ brief
Tienmarketingonline design pringting_ creative_ briefhttp://vntseafood.com
 
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chống
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chốngĐồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chống
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chốngnataliej4
 
đề Tài-tìm-hiểu-về-tường-lửa-.pdf
đề Tài-tìm-hiểu-về-tường-lửa-.pdfđề Tài-tìm-hiểu-về-tường-lửa-.pdf
đề Tài-tìm-hiểu-về-tường-lửa-.pdfAlexander Dung
 
Phát hiện ảnh giấu tin dùng lsb bằng pp po v
Phát hiện ảnh giấu tin dùng lsb bằng pp po vPhát hiện ảnh giấu tin dùng lsb bằng pp po v
Phát hiện ảnh giấu tin dùng lsb bằng pp po vPhạm Dũng
 
Bao cao session hijacking it-slideshares.blogspot.com
Bao cao session hijacking it-slideshares.blogspot.comBao cao session hijacking it-slideshares.blogspot.com
Bao cao session hijacking it-slideshares.blogspot.comphanleson
 
Đề tài: tấn công qua mạng và cách phòng chống
Đề tài: tấn công qua mạng và cách phòng chốngĐề tài: tấn công qua mạng và cách phòng chống
Đề tài: tấn công qua mạng và cách phòng chốngThái Phan Minh
 
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...Dịch vụ viết bài trọn gói ZALO: 0909232620
 
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...Vita in Campagna
 
Quản lý dự án (Bách Khoa)
Quản lý dự án (Bách Khoa)Quản lý dự án (Bách Khoa)
Quản lý dự án (Bách Khoa)Tran Tien
 
Báo cáo đề tài thực tập tốt nghiệp
Báo cáo đề tài thực tập tốt nghiệpBáo cáo đề tài thực tập tốt nghiệp
Báo cáo đề tài thực tập tốt nghiệpMinh Dương
 
Художня культура. 10 клас. Український театр та кіномистецтво
Художня культура. 10 клас. Український театр та кіномистецтвоХудожня культура. 10 клас. Український театр та кіномистецтво
Художня культура. 10 клас. Український театр та кіномистецтвоAndy Levkovich
 
Hazrat Khalid Bin Waleed Book By Ataurrahman Noori
Hazrat Khalid Bin Waleed Book By Ataurrahman NooriHazrat Khalid Bin Waleed Book By Ataurrahman Noori
Hazrat Khalid Bin Waleed Book By Ataurrahman NooriAtaurrahman Noori
 
Giới thiệu về AIML
Giới thiệu về AIMLGiới thiệu về AIML
Giới thiệu về AIMLMinh Pham
 
Chatbot mohinh sinh
Chatbot mohinh sinhChatbot mohinh sinh
Chatbot mohinh sinhpqtrung5th1
 

Was ist angesagt? (20)

Đề tài: Nghiên cứu kỹ thuật tấn công mạng LAN và giải pháp, HAY
Đề tài: Nghiên cứu kỹ thuật tấn công mạng LAN và giải pháp, HAYĐề tài: Nghiên cứu kỹ thuật tấn công mạng LAN và giải pháp, HAY
Đề tài: Nghiên cứu kỹ thuật tấn công mạng LAN và giải pháp, HAY
 
ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESS
ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESSĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESS
ĐỒ ÁN XÂY DỰNG WEBSITE BÁN HÀNG BẰNG WORDPRESS
 
Bai Thuc hanh DNS
Bai Thuc hanh DNSBai Thuc hanh DNS
Bai Thuc hanh DNS
 
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...
Tìm hiểu công nghệ ảo hóa và đề xuất mô hình triển khai cho các đơn vị vừa và...
 
Tienmarketingonline design pringting_ creative_ brief
Tienmarketingonline design pringting_ creative_ briefTienmarketingonline design pringting_ creative_ brief
Tienmarketingonline design pringting_ creative_ brief
 
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chống
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chốngĐồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chống
Đồ án thực tập cơ sở các kĩ thuật tấn công SQL injection và cách phòng chống
 
đề Tài-tìm-hiểu-về-tường-lửa-.pdf
đề Tài-tìm-hiểu-về-tường-lửa-.pdfđề Tài-tìm-hiểu-về-tường-lửa-.pdf
đề Tài-tìm-hiểu-về-tường-lửa-.pdf
 
Phát hiện ảnh giấu tin dùng lsb bằng pp po v
Phát hiện ảnh giấu tin dùng lsb bằng pp po vPhát hiện ảnh giấu tin dùng lsb bằng pp po v
Phát hiện ảnh giấu tin dùng lsb bằng pp po v
 
Bao cao session hijacking it-slideshares.blogspot.com
Bao cao session hijacking it-slideshares.blogspot.comBao cao session hijacking it-slideshares.blogspot.com
Bao cao session hijacking it-slideshares.blogspot.com
 
Đề tài: tấn công qua mạng và cách phòng chống
Đề tài: tấn công qua mạng và cách phòng chốngĐề tài: tấn công qua mạng và cách phòng chống
Đề tài: tấn công qua mạng và cách phòng chống
 
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...
Đề tài: Ứng dụng Mod Security để bảo vệ web server, HAY, 9đ - Gửi miễn phí qu...
 
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...
La coltivazione del cavolo broccolo, dalla preparazione del terreno alla racc...
 
Quản lý dự án (Bách Khoa)
Quản lý dự án (Bách Khoa)Quản lý dự án (Bách Khoa)
Quản lý dự án (Bách Khoa)
 
Luận văn: Bảo mật thông tin trong hệ thống mạng cục bộ, HAY, 9đ
Luận văn: Bảo mật thông tin trong hệ thống mạng cục bộ, HAY, 9đLuận văn: Bảo mật thông tin trong hệ thống mạng cục bộ, HAY, 9đ
Luận văn: Bảo mật thông tin trong hệ thống mạng cục bộ, HAY, 9đ
 
Bai tap thuc hanh
Bai tap thuc hanhBai tap thuc hanh
Bai tap thuc hanh
 
Báo cáo đề tài thực tập tốt nghiệp
Báo cáo đề tài thực tập tốt nghiệpBáo cáo đề tài thực tập tốt nghiệp
Báo cáo đề tài thực tập tốt nghiệp
 
Художня культура. 10 клас. Український театр та кіномистецтво
Художня культура. 10 клас. Український театр та кіномистецтвоХудожня культура. 10 клас. Український театр та кіномистецтво
Художня культура. 10 клас. Український театр та кіномистецтво
 
Hazrat Khalid Bin Waleed Book By Ataurrahman Noori
Hazrat Khalid Bin Waleed Book By Ataurrahman NooriHazrat Khalid Bin Waleed Book By Ataurrahman Noori
Hazrat Khalid Bin Waleed Book By Ataurrahman Noori
 
Giới thiệu về AIML
Giới thiệu về AIMLGiới thiệu về AIML
Giới thiệu về AIML
 
Chatbot mohinh sinh
Chatbot mohinh sinhChatbot mohinh sinh
Chatbot mohinh sinh
 

Ähnlich wie Socket Programming Overview

Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxRunning Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxjoellemurphey
 
Chat server nitish nagar
Chat server nitish nagarChat server nitish nagar
Chat server nitish nagarNitish Nagar
 
Mail Server Project Report
Mail Server Project ReportMail Server Project Report
Mail Server Project ReportKavita Sharma
 
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4Syed Ariful Islam Emon
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagarNitish Nagar
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure CallNadia Nahar
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdfEidTahir
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdfsecunderbadtirumalgi
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using javaUC San Diego
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middlewaresanjoysanyal
 
Internet technology unit 5
Internet technology unit 5Internet technology unit 5
Internet technology unit 5WE-IT TUTORIALS
 
Java Networking
Java NetworkingJava Networking
Java NetworkingSunil OS
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network servicesUc Man
 
HAProxy as Egress Controller
HAProxy as Egress ControllerHAProxy as Egress Controller
HAProxy as Egress ControllerJulien Pivotto
 

Ähnlich wie Socket Programming Overview (20)

Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docxRunning Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
Running Head CLIENT SERVER AUTHENTICATIONHANDLING CONCURRENT CL.docx
 
Chat server nitish nagar
Chat server nitish nagarChat server nitish nagar
Chat server nitish nagar
 
Mail Server Project Report
Mail Server Project ReportMail Server Project Report
Mail Server Project Report
 
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4
Ch2 the application layer protocols_ftp_telnet_samba_dhcp_4
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagar
 
Unit 6 : Application Layer
Unit 6 : Application LayerUnit 6 : Application Layer
Unit 6 : Application Layer
 
Remote Procedure Call
Remote Procedure CallRemote Procedure Call
Remote Procedure Call
 
009577496.pdf
009577496.pdf009577496.pdf
009577496.pdf
 
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP  #inc.pdfCODE FOR echo_client.c A simple echo client using TCP  #inc.pdf
CODE FOR echo_client.c A simple echo client using TCP #inc.pdf
 
Socket programming using java
Socket programming using javaSocket programming using java
Socket programming using java
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Topic2 Understanding Middleware
Topic2 Understanding MiddlewareTopic2 Understanding Middleware
Topic2 Understanding Middleware
 
Internet technology unit 5
Internet technology unit 5Internet technology unit 5
Internet technology unit 5
 
Np unit iii
Np unit iiiNp unit iii
Np unit iii
 
Sockets
SocketsSockets
Sockets
 
Think async
Think asyncThink async
Think async
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 
Socket programming
Socket programmingSocket programming
Socket programming
 
HAProxy as Egress Controller
HAProxy as Egress ControllerHAProxy as Egress Controller
HAProxy as Egress Controller
 

Kürzlich hochgeladen

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Kürzlich hochgeladen (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Socket Programming Overview

  • 1. Huma Chaudhry ME111012 Nima bahrami ME101004 1 Huma 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-Catch Huma 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 server Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 4
  • 6. Sneak Peak into the Code Server Side Client Side Huma 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 Server Huma 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 File Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 16
  • 17. Client Closing Connection: Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 17
  • 18. Thanks to TCP Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 18
  • 19. Huma Chaudhry(ME111012), Nima Bahrami(ME101004) 19