SlideShare a Scribd company logo
Networking
TCP
      connection-based protocol that provides a
      reliable flow of data between two computers.
      TCP is based on a four-layered model.

                           HTTP, FTP – High level protocol

                           TCP, UDP – Open, maintain connection
                           IP – Transmits packet from one IP add to
                           another
                           IP – Physical equipment such as twisted
                           pair cables
Data transfer
     Ordered data transfer
     Retransmission of lost packets
     Error-free data transfer
     Flow control
     Congestion control
Java provides the java.net package to perform
system-independent network communication
Networking basics
     A computer generally has a single physical
connection available for the network.
Port
       The physical connection is numbered within a range of 0 to
65535, called Ports.
       Ranges from 0 to 1023 are reserved for HTTP, FTP …
       Data transmitted is accompanied with the destination
address and the port number.
URL
      Uniform Resource Locator
      a reference or an address to a resource on
Internet.
      Two parts:
URL
      Resource name contains:
           Host name
           File name
           Port number
What different?
     http://vn.yahoo.com:80/index.html
     http://vn.yahoo.com/index.html
     http://vn.yahoo.com/
URL
       Constructors:
             URL(String url)
             URL(String protocol, String host, String file)
             URL(String protocol, String host, int port,
String file)
             URL(URL baseURL, String relativeURL)
Methods of URL
    public String getHost()
    public String getFile()
    public String getPath()
    public final InputStream openStream()
Methods of InetAddress
     public String getHostAddress()
     public String getHostName()
     public static InetAddress getLocalHost()
     public static InetAddress getByName(String host)
URLConnection
      Abstract class represents the communication link
between an application and a URL.
      Used to read from and to write to the resource
referenced by the URL.
URLConnection
     Cannot instantiate a URLConnection obj directly.
     Create URLConnection obj by method
openConnection() of URL class
           . openConnection()
           . getInputStream()
           . getOutStream()
Socket
     one end-point of a two-way communication link
between two programs running on the network
Socket
    Socket(String host, int port)
          UnknowHostException
          OIException
Socket
    Retrieve the InputStream from the socket
    Retrieve the OutputStream from the socket
    Read from the InputStream
    Write the OutputStream
ServerSocket
        represents the server side.
        If the ServerSocket successful in binding to a
port, I can then wait and listen for client request

      public ServerSocket(int port) throws IOException
ServerSocket
    Steps:
             . Initiate ServerSocket obj
             . accept()
             . OutputStream
             . InputStream
UDP – User Datagram Protocol
       sent message, referred to as datagrams, to other
host
UDP – User Datagram Protocol
     Unreliable
     Not ordered
     Lightweight
     No congestion control
UDP
Time-sensitive applications often use UDP
      VoIp
      Online games
DatagramPacket
    create a datagram packet.
    Constructors:
    DatagramPacket(byte[], int)
    DatagramPacket(byte[], int, InetAddress, int)

          buf, length, address, port
DatagramSocket
      represents a socket for sending and receiving
datagram packets.

      Constructors:
      DatagramSocket(int)
      DatagramSocket(port, InetAddress)
Methods of DatagramSocket
    public void send(DatagramPacket p)
    public void receive(DatagramPacket p)
Methods of DatagramPackets
    public InetAddress getAddress()
    public int getPort()
    public byte[] getData()
    public void setData(byte[] data)
    public void setPort(int port)

More Related Content

What's hot

Networking in Java
Networking in JavaNetworking in Java
Networking in Java
Tushar B Kute
 
Java networking
Java networkingJava networking
Java networking
Arati Gadgil
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
Vipin Yadav
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)UC San Diego
 
Socket programming-in-python
Socket programming-in-pythonSocket programming-in-python
Socket programming-in-python
Yuvaraja Ravi
 
Socket programming
Socket programmingSocket programming
Socket programming
MdEmonRana
 
Networking Java Socket Programming
Networking Java Socket ProgrammingNetworking Java Socket Programming
Networking Java Socket ProgrammingMousmi Pawar
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In Java
Ankur Agrawal
 
IP Datagram Structure
IP Datagram StructureIP Datagram Structure
IP Datagram Structure
Hitesh Mohapatra
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in Java
Tushar B Kute
 
Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)
Ministry of Higher Education
 
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
 
Session 6
Session 6Session 6
Session 6
Parthipan Parthi
 

What's hot (20)

IPC SOCKET
IPC SOCKETIPC SOCKET
IPC SOCKET
 
Networking in Java
Networking in JavaNetworking in Java
Networking in Java
 
Networking
NetworkingNetworking
Networking
 
Networking
NetworkingNetworking
Networking
 
Java networking
Java networkingJava networking
Java networking
 
Java Socket Programming
Java Socket ProgrammingJava Socket Programming
Java Socket Programming
 
Socket programming in Java (PPTX)
Socket programming in Java (PPTX)Socket programming in Java (PPTX)
Socket programming in Java (PPTX)
 
Socket programming-in-python
Socket programming-in-pythonSocket programming-in-python
Socket programming-in-python
 
Python networking
Python networkingPython networking
Python networking
 
Socket programming
Socket programmingSocket programming
Socket programming
 
28 networking
28  networking28  networking
28 networking
 
Networking Java Socket Programming
Networking Java Socket ProgrammingNetworking Java Socket Programming
Networking Java Socket Programming
 
Networking & Socket Programming In Java
Networking & Socket Programming In JavaNetworking & Socket Programming In Java
Networking & Socket Programming In Java
 
Ipc
IpcIpc
Ipc
 
TCPIP
TCPIPTCPIP
TCPIP
 
IP Datagram Structure
IP Datagram StructureIP Datagram Structure
IP Datagram Structure
 
Network Programming in Java
Network Programming in JavaNetwork Programming in Java
Network Programming in Java
 
Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)
 
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
 
Session 6
Session 6Session 6
Session 6
 

Viewers also liked

Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
Wenni Meliana
 
ACC 626 - Forensics for IT
ACC 626 - Forensics for ITACC 626 - Forensics for IT
ACC 626 - Forensics for ITj9lai
 
Ne ctar openstack asia 2012 final
Ne ctar openstack asia 2012 finalNe ctar openstack asia 2012 final
Ne ctar openstack asia 2012 finalOpenCity Community
 
DIWALI
DIWALIDIWALI
DIWALI
Rahul Gavade
 
تمثيل البيانات بيانياً
تمثيل البيانات بيانياًتمثيل البيانات بيانياً
تمثيل البيانات بيانياًheshmat2010
 
Оскудение речи
Оскудение речиОскудение речи
Оскудение речиninaviktor
 
Сезон простуд вебинар2016
Сезон простуд вебинар2016Сезон простуд вебинар2016
Сезон простуд вебинар2016
Елена Шальнова
 
Con8837 leverage authorization to monetize content and media subscriptions ...
Con8837   leverage authorization to monetize content and media subscriptions ...Con8837   leverage authorization to monetize content and media subscriptions ...
Con8837 leverage authorization to monetize content and media subscriptions ...
OracleIDM
 
Infographic - MSP AWS Migration
Infographic - MSP AWS MigrationInfographic - MSP AWS Migration
Infographic - MSP AWS Migration
CopperEgg
 
Plant Healthcare Client Report
Plant Healthcare Client ReportPlant Healthcare Client Report
Plant Healthcare Client Report
davkearn
 
Tutte le crociate e litanie
Tutte le crociate e litanieTutte le crociate e litanie
Englekirk Brochure
Englekirk BrochureEnglekirk Brochure
Englekirk Brochurekimtanouye
 
Gravitas info movie
Gravitas info movieGravitas info movie
Gravitas info movieMark Wagner
 
Network Layer
Network LayerNetwork Layer
Network Layer
Robby Firmansyah
 
Track2 -何斌--openstack 在京东的应用实践
Track2 -何斌--openstack 在京东的应用实践Track2 -何斌--openstack 在京东的应用实践
Track2 -何斌--openstack 在京东的应用实践OpenCity Community
 
Caza del tesoro roma
Caza del tesoro romaCaza del tesoro roma
Caza del tesoro roma
profeitaliano
 
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
Antwerp Management School
 
絕了,能把漢字寫成這樣
絕了,能把漢字寫成這樣絕了,能把漢字寫成這樣
絕了,能把漢字寫成這樣Danny Lin
 

Viewers also liked (20)

Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
Sk dirjen pendis nomor 3932 th 2016 madrasah k13 tp 2016 2017
 
ACC 626 - Forensics for IT
ACC 626 - Forensics for ITACC 626 - Forensics for IT
ACC 626 - Forensics for IT
 
Ne ctar openstack asia 2012 final
Ne ctar openstack asia 2012 finalNe ctar openstack asia 2012 final
Ne ctar openstack asia 2012 final
 
DIWALI
DIWALIDIWALI
DIWALI
 
تمثيل البيانات بيانياً
تمثيل البيانات بيانياًتمثيل البيانات بيانياً
تمثيل البيانات بيانياً
 
Оскудение речи
Оскудение речиОскудение речи
Оскудение речи
 
Сезон простуд вебинар2016
Сезон простуд вебинар2016Сезон простуд вебинар2016
Сезон простуд вебинар2016
 
Con8837 leverage authorization to monetize content and media subscriptions ...
Con8837   leverage authorization to monetize content and media subscriptions ...Con8837   leverage authorization to monetize content and media subscriptions ...
Con8837 leverage authorization to monetize content and media subscriptions ...
 
Infographic - MSP AWS Migration
Infographic - MSP AWS MigrationInfographic - MSP AWS Migration
Infographic - MSP AWS Migration
 
Plant Healthcare Client Report
Plant Healthcare Client ReportPlant Healthcare Client Report
Plant Healthcare Client Report
 
Celebrate Alice! 2011
Celebrate Alice! 2011Celebrate Alice! 2011
Celebrate Alice! 2011
 
Tutte le crociate e litanie
Tutte le crociate e litanieTutte le crociate e litanie
Tutte le crociate e litanie
 
Kkk1
Kkk1Kkk1
Kkk1
 
Englekirk Brochure
Englekirk BrochureEnglekirk Brochure
Englekirk Brochure
 
Gravitas info movie
Gravitas info movieGravitas info movie
Gravitas info movie
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Track2 -何斌--openstack 在京东的应用实践
Track2 -何斌--openstack 在京东的应用实践Track2 -何斌--openstack 在京东的应用实践
Track2 -何斌--openstack 在京东的应用实践
 
Caza del tesoro roma
Caza del tesoro romaCaza del tesoro roma
Caza del tesoro roma
 
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
Leiderschap tonen in duurzame ontwikkeling: hoe haalbaar is het? - Jan Beyne ...
 
絕了,能把漢字寫成這樣
絕了,能把漢字寫成這樣絕了,能把漢字寫成這樣
絕了,能把漢字寫成這樣
 

Similar to Networking

Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
Tushar B Kute
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
Tushar B Kute
 
Lecture25
Lecture25Lecture25
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
VijiPriya Jeyamani
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagar
Nitish Nagar
 
Network programming in java - PPT
Network programming in java - PPTNetwork programming in java - PPT
Network programming in java - PPT
kamal kotecha
 
Tcp/ip server sockets
Tcp/ip server socketsTcp/ip server sockets
Tcp/ip server sockets
rajshreemuthiah
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.com
phanleson
 
Os 2
Os 2Os 2
Java networking
Java networkingJava networking
Java networking
ssuser3a47cb
 
Sockets
Sockets Sockets
Sockets
Gopaiah Sanaka
 
Java 1
Java 1Java 1
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
Socket Programming
Socket  ProgrammingSocket  Programming
Socket Programmingleminhvuong
 
The Internet and World Wide Web
The Internet and World Wide WebThe Internet and World Wide Web
The Internet and World Wide Webwebhostingguy
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
Maryna Vasina
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
Cleveroad
 
Mail Server Project Report
Mail Server Project ReportMail Server Project Report
Mail Server Project ReportKavita Sharma
 

Similar to Networking (20)

Unit 8 Java
Unit 8 JavaUnit 8 Java
Unit 8 Java
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Network programming in Java
Network programming in JavaNetwork programming in Java
Network programming in Java
 
Lecture25
Lecture25Lecture25
Lecture25
 
Sockets
SocketsSockets
Sockets
 
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriyaIPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
IPT Chapter 2 Web Services and Middleware - Dr. J. VijiPriya
 
Socket Programming - nitish nagar
Socket Programming - nitish nagarSocket Programming - nitish nagar
Socket Programming - nitish nagar
 
Network programming in java - PPT
Network programming in java - PPTNetwork programming in java - PPT
Network programming in java - PPT
 
Tcp/ip server sockets
Tcp/ip server socketsTcp/ip server sockets
Tcp/ip server sockets
 
Socket Programming it-slideshares.blogspot.com
Socket  Programming it-slideshares.blogspot.comSocket  Programming it-slideshares.blogspot.com
Socket Programming it-slideshares.blogspot.com
 
Os 2
Os 2Os 2
Os 2
 
Java networking
Java networkingJava networking
Java networking
 
Sockets
Sockets Sockets
Sockets
 
Java 1
Java 1Java 1
Java 1
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
Socket Programming
Socket  ProgrammingSocket  Programming
Socket Programming
 
The Internet and World Wide Web
The Internet and World Wide WebThe Internet and World Wide Web
The Internet and World Wide Web
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
 
Socket.io v.0.8.3
Socket.io v.0.8.3Socket.io v.0.8.3
Socket.io v.0.8.3
 
Mail Server Project Report
Mail Server Project ReportMail Server Project Report
Mail Server Project Report
 

More from Tuan Ngo

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enTuan Ngo
 
Net framework
Net frameworkNet framework
Net frameworkTuan Ngo
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable typesTuan Ngo
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iteratorsTuan Ngo
 
13 collections
13   collections13   collections
13 collectionsTuan Ngo
 
11 exception handling
11   exception handling11   exception handling
11 exception handlingTuan Ngo
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegatesTuan Ngo
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexersTuan Ngo
 
10 namespace
10  namespace10  namespace
10 namespaceTuan Ngo
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces Tuan Ngo
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphismTuan Ngo
 
6 class and methods
6    class and methods6    class and methods
6 class and methodsTuan Ngo
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operatorsTuan Ngo
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructsTuan Ngo
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#Tuan Ngo
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data typesTuan Ngo
 

More from Tuan Ngo (20)

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
 
Net framework
Net frameworkNet framework
Net framework
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
 
13 collections
13   collections13   collections
13 collections
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
 
10 namespace
10  namespace10  namespace
10 namespace
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 
5 arrays
5   arrays5   arrays
5 arrays
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
 
Jdbc 7
Jdbc 7Jdbc 7
Jdbc 7
 
Jdbc 6
Jdbc 6Jdbc 6
Jdbc 6
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Networking

  • 2. TCP connection-based protocol that provides a reliable flow of data between two computers. TCP is based on a four-layered model. HTTP, FTP – High level protocol TCP, UDP – Open, maintain connection IP – Transmits packet from one IP add to another IP – Physical equipment such as twisted pair cables
  • 3. Data transfer Ordered data transfer Retransmission of lost packets Error-free data transfer Flow control Congestion control
  • 4. Java provides the java.net package to perform system-independent network communication
  • 5. Networking basics A computer generally has a single physical connection available for the network.
  • 6. Port The physical connection is numbered within a range of 0 to 65535, called Ports. Ranges from 0 to 1023 are reserved for HTTP, FTP … Data transmitted is accompanied with the destination address and the port number.
  • 7. URL Uniform Resource Locator a reference or an address to a resource on Internet. Two parts:
  • 8. URL Resource name contains: Host name File name Port number
  • 9. What different? http://vn.yahoo.com:80/index.html http://vn.yahoo.com/index.html http://vn.yahoo.com/
  • 10. URL Constructors: URL(String url) URL(String protocol, String host, String file) URL(String protocol, String host, int port, String file) URL(URL baseURL, String relativeURL)
  • 11. Methods of URL public String getHost() public String getFile() public String getPath() public final InputStream openStream()
  • 12. Methods of InetAddress public String getHostAddress() public String getHostName() public static InetAddress getLocalHost() public static InetAddress getByName(String host)
  • 13. URLConnection Abstract class represents the communication link between an application and a URL. Used to read from and to write to the resource referenced by the URL.
  • 14. URLConnection Cannot instantiate a URLConnection obj directly. Create URLConnection obj by method openConnection() of URL class . openConnection() . getInputStream() . getOutStream()
  • 15. Socket one end-point of a two-way communication link between two programs running on the network
  • 16. Socket Socket(String host, int port) UnknowHostException OIException
  • 17. Socket Retrieve the InputStream from the socket Retrieve the OutputStream from the socket Read from the InputStream Write the OutputStream
  • 18. ServerSocket represents the server side. If the ServerSocket successful in binding to a port, I can then wait and listen for client request public ServerSocket(int port) throws IOException
  • 19. ServerSocket Steps: . Initiate ServerSocket obj . accept() . OutputStream . InputStream
  • 20. UDP – User Datagram Protocol sent message, referred to as datagrams, to other host
  • 21. UDP – User Datagram Protocol Unreliable Not ordered Lightweight No congestion control
  • 22. UDP Time-sensitive applications often use UDP VoIp Online games
  • 23. DatagramPacket create a datagram packet. Constructors: DatagramPacket(byte[], int) DatagramPacket(byte[], int, InetAddress, int) buf, length, address, port
  • 24. DatagramSocket represents a socket for sending and receiving datagram packets. Constructors: DatagramSocket(int) DatagramSocket(port, InetAddress)
  • 25. Methods of DatagramSocket public void send(DatagramPacket p) public void receive(DatagramPacket p)
  • 26. Methods of DatagramPackets public InetAddress getAddress() public int getPort() public byte[] getData() public void setData(byte[] data) public void setPort(int port)