• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Differnces

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
Could anyone please tell me the differences between a socket and a port
Thank U all in advance
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A socket is a connetion between two processes. Sockets are not necessarily over the network, however this is how they are used quite often. When you telnet, the telnet appliacation creates a socket to connect to the telnet server so that the application and the server can talk to each other.
A port is a place where a connection (a socket) can connect to on the local machine. There are something like 8000 ports on a computer. You can consider a system's ports much like a harbor's ports. The ships (or connections) need a place to dock. The ports provide the many different places where that ship (or connection) can dock (or establish communication).
For example, telnet commonly uses port 23 for its connection.
I would recommend finding some good networking books to further your understanding.

Originally posted by kiran, kumar:
Hi everyone,
Could anyone please tell me the differences between a socket and a port
Thank U all in advance


 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kirin,
To, say it in very simple words, Socket is a Pipe and Port is openings of the Pipe.
ie as u know telnet uses port 23. it means i reads and writes data through the opening no. 23 and i think i can use any avaliable free scocket..
if there are mistakes, Corrections are welcome
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic