Q. what is the difference between socket & port ?

Answers were Sorted based on User's Feedback



Q. what is the difference between socket & port ?..

Answer / srinivas antarvedi

port : a particular port number on a host
socket: a host and a port

like
-> http port = 80
-> when you fire up google.com
the socket on the server side is google.com:80 this is the server side socket

on your local system where you are browsing the socket is
yourip:port above 1024

Is This Answer Correct ?    18 Yes 1 No

Q. what is the difference between socket & port ?..

Answer / guest

Port : Port no is the s/w address on a computer on the n/w.
for instance smtp : 25 and pop : 109 and so on....
Socket : Socket is the communication path to a port.
Basically Socket = ip + port, so Socket provides the access
to the ip+port

Is This Answer Correct ?    9 Yes 2 No

Post New Answer

More Linux Socket Programming Interview Questions

HOW TCP/IP Handles Duplicated Packets?

0 Answers  


How to Generate Addresses?

0 Answers  


How to Choose a Socket Type?

0 Answers  


How to Reply to a Wild Address?

0 Answers  


how to get client port number in server socket programming??

5 Answers  






What is the use of inet_addr() Function?

0 Answers  


What are the different types of sockets?

0 Answers  


What is the use of PF_INET and SOCK_DGRAM?

0 Answers  


How to look up a Service by Port and Protocol?

0 Answers  


What is the use of setprotoent(3) Function?

0 Answers  


How to Bind a Specific Interface Address?

0 Answers  


How does socket communication work?

0 Answers  


Categories