SlideShare une entreprise Scribd logo
1  sur  26
Chapter 3 Socket Programming Lecturer: Sivadon Chaisiri Mathematics, Statistics and Computer Department Faculty of Science, Ubon Rajathanee University
Layered Protocols
Metadata in a Messages
Protocols ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
TCP/IP four-layer model
IP, TCP, and UDP ,[object Object],[object Object],[object Object]
Ports ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Ports and Applications
The Client-Server Model
Socket Application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Endpoint-to-Endpoint Communications
Java and Socket ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Java and Socket ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Socket and ServerSocket
Streams More stream classes InputStream : DataInputStream, ObjectInputStream OutputStream : DataOutputStream, ObjectOutputStream
Filters of Streams
Code: Socket Information ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Steps to develop a socket app ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code: Time Server ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code: Time Client ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code: Hello Server ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code: Hello Client ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code: Busy Hello Server ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code:  Multithread Hello Server ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code:  Multithread Hello Server   (Short Form) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The End Any Questions?

Contenu connexe

Tendances

Java- Datagram Socket class & Datagram Packet class
Java- Datagram Socket class  & Datagram Packet classJava- Datagram Socket class  & Datagram Packet class
Java- Datagram Socket class & Datagram Packet class
Ruchi Maurya
 
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
Kiyotaka Oku
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
elliando dias
 

Tendances (20)

Lecture10
Lecture10Lecture10
Lecture10
 
File Transfer Through Sockets
File Transfer Through SocketsFile Transfer Through Sockets
File Transfer Through Sockets
 
Network Sockets
Network SocketsNetwork Sockets
Network Sockets
 
Lecture6
Lecture6Lecture6
Lecture6
 
Winform
WinformWinform
Winform
 
Java- Datagram Socket class & Datagram Packet class
Java- Datagram Socket class  & Datagram Packet classJava- Datagram Socket class  & Datagram Packet class
Java- Datagram Socket class & Datagram Packet class
 
Sockets intro
Sockets introSockets intro
Sockets intro
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
 
Lab4
Lab4Lab4
Lab4
 
A.java
A.javaA.java
A.java
 
Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD Relayd: a load balancer for OpenBSD
Relayd: a load balancer for OpenBSD
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
 
Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介Grails/Groovyによる開発事例紹介
Grails/Groovyによる開発事例紹介
 
Socket programming
Socket programmingSocket programming
Socket programming
 
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
About Those Python Async Concurrent Frameworks - Fantix @ OSTC 2014
 
LibreSSL, one year later
LibreSSL, one year laterLibreSSL, one year later
LibreSSL, one year later
 
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While TestingQA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RIThe Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
The Ruby Guide to *nix Plumbing: on the quest for efficiency with Ruby [M|K]RI
 
Socket programming-tutorial-sk
Socket programming-tutorial-skSocket programming-tutorial-sk
Socket programming-tutorial-sk
 

En vedette

Optimal Virtual Machine Placement across Multiple Cloud Providers
Optimal Virtual Machine Placement across Multiple Cloud ProvidersOptimal Virtual Machine Placement across Multiple Cloud Providers
Optimal Virtual Machine Placement across Multiple Cloud Providers
Sivadon Chaisiri
 
Robust Cloud Resource Provisioning for Cloud Computing Environments
Robust Cloud Resource Provisioning for Cloud Computing EnvironmentsRobust Cloud Resource Provisioning for Cloud Computing Environments
Robust Cloud Resource Provisioning for Cloud Computing Environments
Sivadon Chaisiri
 
Economic Analysis of Resource Market in Cloud Computing Environment
Economic Analysis of Resource Market in Cloud Computing EnvironmentEconomic Analysis of Resource Market in Cloud Computing Environment
Economic Analysis of Resource Market in Cloud Computing Environment
Sivadon Chaisiri
 

En vedette (19)

Intelbloggerday08
Intelbloggerday08Intelbloggerday08
Intelbloggerday08
 
Present Paper: Protecting Free Expression Online on Freenet
Present Paper: Protecting Free Expression Online on FreenetPresent Paper: Protecting Free Expression Online on Freenet
Present Paper: Protecting Free Expression Online on Freenet
 
Remote Call
Remote CallRemote Call
Remote Call
 
Cost Minimization for Provisioning Virtual Servers in Amazon EC2
Cost Minimization for Provisioning Virtual Servers in Amazon EC2Cost Minimization for Provisioning Virtual Servers in Amazon EC2
Cost Minimization for Provisioning Virtual Servers in Amazon EC2
 
02 Ms Online Identity Session 1
02 Ms Online Identity   Session 102 Ms Online Identity   Session 1
02 Ms Online Identity Session 1
 
UX勉強会(第十章)
UX勉強会(第十章)UX勉強会(第十章)
UX勉強会(第十章)
 
Research Issues on Resource Discovery & Matching Making
Research Issues on Resource Discovery & Matching MakingResearch Issues on Resource Discovery & Matching Making
Research Issues on Resource Discovery & Matching Making
 
Research Issues on Grid Resource Brokers
Research Issues on Grid Resource BrokersResearch Issues on Grid Resource Brokers
Research Issues on Grid Resource Brokers
 
Optimal Virtual Machine Placement across Multiple Cloud Providers
Optimal Virtual Machine Placement across Multiple Cloud ProvidersOptimal Virtual Machine Placement across Multiple Cloud Providers
Optimal Virtual Machine Placement across Multiple Cloud Providers
 
Robust Cloud Resource Provisioning for Cloud Computing Environments
Robust Cloud Resource Provisioning for Cloud Computing EnvironmentsRobust Cloud Resource Provisioning for Cloud Computing Environments
Robust Cloud Resource Provisioning for Cloud Computing Environments
 
Presentation: Optimal Power Management for Server Farm to Support Green Compu...
Presentation: Optimal Power Management for Server Farm to Support Green Compu...Presentation: Optimal Power Management for Server Farm to Support Green Compu...
Presentation: Optimal Power Management for Server Farm to Support Green Compu...
 
01 All Up Technical Overview
01 All Up Technical Overview01 All Up Technical Overview
01 All Up Technical Overview
 
Optimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud Computing Optimization of Resource Provisioning Cost in Cloud Computing
Optimization of Resource Provisioning Cost in Cloud Computing
 
Economic Analysis of Resource Market in Cloud Computing Environment
Economic Analysis of Resource Market in Cloud Computing EnvironmentEconomic Analysis of Resource Market in Cloud Computing Environment
Economic Analysis of Resource Market in Cloud Computing Environment
 
Benson Pecha Kucha
Benson Pecha KuchaBenson Pecha Kucha
Benson Pecha Kucha
 
UX勉強会(第十五章)
UX勉強会(第十五章)UX勉強会(第十五章)
UX勉強会(第十五章)
 
動画のあれこれ
動画のあれこれ動画のあれこれ
動画のあれこれ
 
UX勉強会(第五章)
UX勉強会(第五章)UX勉強会(第五章)
UX勉強会(第五章)
 
UX勉強会(第四章)
UX勉強会(第四章) UX勉強会(第四章)
UX勉強会(第四章)
 

Similaire à Socket Programming

Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client server
trilestari08
 
I need you to modify and change the loop in this code without changing.docx
I need you to modify and change the loop in this code without changing.docxI need you to modify and change the loop in this code without changing.docx
I need you to modify and change the loop in this code without changing.docx
hendriciraida
 
I need an explaining for each step in this code and the reason of it-.docx
I need an explaining for each step in this code and the reason of it-.docxI need an explaining for each step in this code and the reason of it-.docx
I need an explaining for each step in this code and the reason of it-.docx
hendriciraida
 
Chatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptopChatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptop
yayaria
 
Lab manual cn-2012-13
Lab manual cn-2012-13Lab manual cn-2012-13
Lab manual cn-2012-13
Sasi Kala
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi client
ichsanbarokah
 

Similaire à Socket Programming (20)

java sockets
 java sockets java sockets
java sockets
 
Network
NetworkNetwork
Network
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client server
 
I need you to modify and change the loop in this code without changing.docx
I need you to modify and change the loop in this code without changing.docxI need you to modify and change the loop in this code without changing.docx
I need you to modify and change the loop in this code without changing.docx
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
 
I need an explaining for each step in this code and the reason of it-.docx
I need an explaining for each step in this code and the reason of it-.docxI need an explaining for each step in this code and the reason of it-.docx
I need an explaining for each step in this code and the reason of it-.docx
 
Chatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptopChatting dengan beberapa pc laptop
Chatting dengan beberapa pc laptop
 
Ipc
IpcIpc
Ipc
 
Lab manual cn-2012-13
Lab manual cn-2012-13Lab manual cn-2012-13
Lab manual cn-2012-13
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.com
 
Advance Java-Network Programming
Advance Java-Network ProgrammingAdvance Java-Network Programming
Advance Java-Network Programming
 
Network programming1
Network programming1Network programming1
Network programming1
 
Laporan multi client
Laporan multi clientLaporan multi client
Laporan multi client
 
Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
分散式系統
分散式系統分散式系統
分散式系統
 
Hi, I need some one to help me with Design a client-server Chat so.pdf
Hi, I need some one to help me with Design a client-server Chat so.pdfHi, I need some one to help me with Design a client-server Chat so.pdf
Hi, I need some one to help me with Design a client-server Chat so.pdf
 
Networking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in programNetworking.ppt(client/server, socket) uses in program
Networking.ppt(client/server, socket) uses in program
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In Java
 
Java 1
Java 1Java 1
Java 1
 
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {Mast...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {Mast...Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {Mast...
Internet Technology (Practical Questions Paper) [CBSGS - 75:25 Pattern] {Mast...
 

Dernier

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
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Socket Programming