SlideShare a Scribd company logo
SOCKETS IN NACH0S Socket types: STREAM- Uses TCP which is realiable, stream oriented protocol.
RAW- Provides RAW data transfer directly over IP protocol.
DATAGRAM- Message oriented protocol.
SOCKETS IN NACH0S Socket use: Unicast
Multicast
Broadcast
Loopback
SOCKETS IN NACH0S Programming Client-Servidor in JAVA All the class located in the  java.net package.
Stream classes are in the  java.io package.

More Related Content

PPTX
Theorical 1
PPTX
Teorical 1
PDF
PDF
EasyMock 101
PPS
Unbounded
PPT
Unbounded
PPTX
Asynchronous Programming in ASP.NET
PDF
The Ring programming language version 1.5.3 book - Part 89 of 184
Theorical 1
Teorical 1
EasyMock 101
Unbounded
Unbounded
Asynchronous Programming in ASP.NET
The Ring programming language version 1.5.3 book - Part 89 of 184

What's hot (19)

PDF
HTTP/2 Server Push
PPTX
AMC Minor Technical Issues
PPTX
Binary Studio Academy: Concurrency in C# 5.0
PPTX
Go Concurrency Basics
PDF
PPTX
Sitecore - Deep drive into the Sitecore Client pipelines
PDF
New feature of async fakeAsync test in angular
ODP
Django debugging
PPTX
Ob1k presentation at Java.IL
PDF
Asynchronous programming in .net 4.5 with c#
PPTX
Go Concurrency Patterns
PDF
Java day 2016.pptx
PPTX
RxJava Applied
PDF
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
PDF
What is new in Go 1.8
PPTX
Sync with async
PDF
ECMAScript 2015 Tips & Traps
ODP
Building serverless application on the Apache Openwhisk platform
PPTX
Reactive Java (GeeCON 2014)
HTTP/2 Server Push
AMC Minor Technical Issues
Binary Studio Academy: Concurrency in C# 5.0
Go Concurrency Basics
Sitecore - Deep drive into the Sitecore Client pipelines
New feature of async fakeAsync test in angular
Django debugging
Ob1k presentation at Java.IL
Asynchronous programming in .net 4.5 with c#
Go Concurrency Patterns
Java day 2016.pptx
RxJava Applied
OB1K - New, Better, Faster, Devops Friendly Java container by Outbrain
What is new in Go 1.8
Sync with async
ECMAScript 2015 Tips & Traps
Building serverless application on the Apache Openwhisk platform
Reactive Java (GeeCON 2014)
Ad

Similar to Sockets in nach0s (20)

PPT
Socket Programming in Java.ppt yeh haii
PDF
java sockets
PPT
Sockets
PPT
Socket Programming - nitish nagar
PDF
How a network connection is created A network connection is initi.pdf
PDF
Lecture10
PPT
Network programming in Java
PDF
PPT
Network programming in Java
PPTX
Networking in Java
PPTX
Advance Java-Network Programming
PPT
TCP IP
PPT
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
PPT
Network
PPT
Chapter 4 slides
PPT
Network Programming in Java
PPT
Unit 8 Java
PPS
Advance Java
PPT
Networking & Socket Programming In Java
PPTX
Java socket programming
Socket Programming in Java.ppt yeh haii
java sockets
Sockets
Socket Programming - nitish nagar
How a network connection is created A network connection is initi.pdf
Lecture10
Network programming in Java
Network programming in Java
Networking in Java
Advance Java-Network Programming
TCP IP
Sockets.ppt socket sofcv ohghjagshsdjjhjfb
Network
Chapter 4 slides
Network Programming in Java
Unit 8 Java
Advance Java
Networking & Socket Programming In Java
Java socket programming
Ad

More from naniix21_3 (17)

ODP
Semaphore
ODP
Encriptacion
ODP
ODP
Semaphore
ODP
ODP
ODP
Encriptacion
ODP
ODP
ODP
Encriptacion
ODP
Clock
ODP
Security
ODP
Sockets
PPTX
Network.h
ODP
Nach os network
ODP
Nach os network
ODP
Nach os network
Semaphore
Encriptacion
Semaphore
Encriptacion
Encriptacion
Clock
Security
Sockets
Network.h
Nach os network
Nach os network
Nach os network

Recently uploaded (20)

PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Chapter 5: Probability Theory and Statistics
PDF
project resource management chapter-09.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
August Patch Tuesday
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Hindi spoken digit analysis for native and non-native speakers
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Unlocking AI with Model Context Protocol (MCP)
SOPHOS-XG Firewall Administrator PPT.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
A novel scalable deep ensemble learning framework for big data classification...
Group 1 Presentation -Planning and Decision Making .pptx
Chapter 5: Probability Theory and Statistics
project resource management chapter-09.pdf
Hybrid model detection and classification of lung cancer
NewMind AI Weekly Chronicles - August'25-Week II
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf
A comparative study of natural language inference in Swahili using monolingua...
August Patch Tuesday

Sockets in nach0s

  • 1. SOCKETS IN NACH0S Socket types: STREAM- Uses TCP which is realiable, stream oriented protocol.
  • 2. RAW- Provides RAW data transfer directly over IP protocol.
  • 4. SOCKETS IN NACH0S Socket use: Unicast
  • 8. SOCKETS IN NACH0S Programming Client-Servidor in JAVA All the class located in the java.net package.
  • 9. Stream classes are in the java.io package.
  • 10. SOCKETS IN NACHOS How open a socket? For programming a client, create an object of Socket class. Socket Client; try { Client = new Socket("Machine name", PortNumber); } catch (IOException e) { System.out.println(e); }
  • 11. SOCKETS IN NACH0S For programinng a server, in this part how you open a socket. ServerSocket Service; try { Service = new ServerSocket (PortNumber); } catch (IOException e) { System.out.println(e); }
  • 12. When implementing a server you also need create a socket object. Socket clientSocket = null; try { clientSocket = Service.accept(); } catch (IOException e) { System.out.println(e); } SOCKETS IN NACH0S
  • 13. SOCKETS IN NACH0S How to create an imput Stream ? You can use the DataImputStream class . DataInputStream input; try { input = new DataInputStream (Client.getInputStream()); } catch (IOException e) { System.out.println(e); }
  • 14. SOCKETS IN NACH0S How to create an output Stream ? To the server socket using the class PrintStream or DataoutputStream of java.io PrintStream output; try { output = new PrintStream (Client.getOutputStream()); } catch (IOException e) { System.out.println(e); }
  • 15. SOCKETS IN NACH0S How to close socket? You should always close the output and input stream before you close the socket. try { output.close (); input.close (); Client.close(); } catch (IOException e) { System.out.println(e); }