19

I am studying Networking in java.I am not clear about what are ports. Also i need to know about what is a socket?

Please explain it well.

skaffman
  • 398,947
  • 96
  • 818
  • 769
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328

1 Answers1

16

PORTS :

In computer networking, the term port can refer to either physical or virtual connection points.

Physical network ports allow connecting cables to computers, routers, modems and other peripheral devices.
Virtual ports are part of TCP/IP networking. These ports allow software applications to share hardware resources without interfering with each other. Computers and routers automatically manage network traffic traveling via their virtual ports. Network firewalls additionally provide some control over the flow of traffic on each virtual port for security purposes.

SOCKET :

A socket represents a single connection between two network applications. A socket is one end-point of a two-way communication link between two programs running on the network

A good read :

Since you are new to networking, you must visit this link .

Community
  • 1
  • 1
Saurabh Gokhale
  • 53,625
  • 36
  • 139
  • 164