Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CSC364 Lecture 02
Search
Javier Gonzalez-Sanchez
PRO
January 07, 2026
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CSC364 Lecture 02
Introduction to Networked, Distributed, and Parallel Computing
Sockets
(202606)
Javier Gonzalez-Sanchez
PRO
January 07, 2026
More Decks by Javier Gonzalez-Sanchez
See All by Javier Gonzalez-Sanchez
CSC510 Lecture 09
javiergs
PRO
1
33
CSC310 Lecture 06
javiergs
PRO
0
34
CSC310 Lecture 05
javiergs
PRO
0
61
CSC310 Lecture 04
javiergs
PRO
0
45
CSC510 Lecture 03
javiergs
PRO
0
75
CSC310 Lecture 03
javiergs
PRO
0
55
CSC310 Lecture 02
javiergs
PRO
0
68
CSC310 Lecture 01
javiergs
PRO
1
85
CSC510 Lecture 01
javiergs
PRO
1
74
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
830
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
410
So, you think you're a good person
axbom
PRO
2
2.2k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Building AI with AI
inesmontani
PRO
1
1.2k
Building Applications with DynamoDB
mza
96
7.2k
Transcript
Dr. Javier Gonzalez-Sanchez
[email protected]
www.javiergs.info o ffi ce: 14 -227
CSC 364 Introduction to Networked, Distributed, and Parallel Computing Lecture 02. Sockets 1
Socket Socket Socket Socket Socket
3 Goal This is called a system, not just a
program.
4 Goal If we can make two programs talk to
each other, everything else in the course has a place to land.
Fundamentals of Networking Concepts 5
6 Campus Network
7 Concepts • URL • Resource • Protocol • IP
a ddress • Port • DNS • DNS a ddress • DNS server • Firew a ll • Client • Server • Socket
8 Concepts Device A (IP address) 🏭 🏭 Port Port
Port Port Port Port Port Port Socket Socket Device B (IP address)
9 De f inition A socket is a bidirection a
l byte stre a m between two processes (progr a ms) Import a nt: • Not mess a ges (text) • Not objects • Just bytes
10 Why they matters? Sockets a re used everywhere: •
HTTP servers • Multipl a yer g a mes • Distributed d a t a b a ses • ROS nodes S a me ide a s. Bigger sc a le.
11 Client - Server Architecture Server 1. Cre a te
socket 2. Bind to port 3. Listen 4. Accept connection Client 1. Cre a te socket 2. Connect to server 3. Send / receive d a t a
Note About your IP
13 Localhost or 127.0.0.1 loc a lhost A hostn a
me th a t me a ns this computer 127.0.0.1 The IP a ddress of the loopb a ck interf a ce ➡ Both refer to the s a me m a chine you a re running on
14 How to Get Your IP Address m a cOS
/ Linux ifcon f ig Look for inet under en0 (Wi-Fi) or en1. Windows (Comm a nd Prompt or PowerShell) ipcon f ig Look for IPv4 Address.
Client-Server Sockets
Client-Server 16
Implementation :: Server 17 chrestomathy: https://www.javatpoint.com/socket-programming
Implementation :: Server 18
Implementation :: Client 19 chrestomathy: https://www.javatpoint.com/socket-programming
Implementation :: Client 20
21 Homework Run the example Break it!
22 Failure Is Normal Try this: • Kill the server
• Disconnect the client • Send inv a lid d a t a Common errors: • Connection refused • Timeout
23 Questions
Lab. Sockets
25 Goal This is called a system, not just a
program.
CSC 364 Introduction to Introduction to Networked, Distributed, and Parallel
Computing Javier Gonzalez-Sanchez, Ph.D.
[email protected]
Winter 2026 Copyright. These slides can only be used as study material for the class CSC 364 at Cal Poly. They cannot be distributed or used for another purpose. 26