I am new to networking.So I need to know the relations between sockets,IP, protocols(TCP/UDP), what is a socket for,and few other related words. I'm just trying to figure out how it works and want to learn. Can anyone help. at least put some links so that i can follow them. need it soon if possible
1 Answers
More elaborate information here : https://en.wikipedia.org/wiki/Internet_protocol_suite
Concise:
Your computer is on a LAN, that LAN is very likely to run on Ethernet.
On top of this Ethernet runs another protocol, IP.
On top of IP run several other protocols 2 of them are TCP and UDP.
UDP and TCP are multiplexing multiple communication channels that are each distinct on top of the same wire. It is doing that by using port numbers which are part of the protocol and which you can find in their respective header.
TCP and UDP are very much different:
- TCP is Connection oriented whereas UDP is not.
- UDP uses packets whereas TCP is a byte streaming protocol
- TCP is reliable whereas UDP is not
- other differences, this list is not exhaustive
To make TCP and UDP accessible to programs there is an application interface based on sockets. So you need a socket if you want to send or receive something. https://en.wikipedia.org/wiki/Berkeley_sockets
But this is very broad topic and if it is your intention to start using this technology then you have to do a lot of reading.

- 7,344
- 3
- 28
- 39
-
thanks. then what is BSD sockets and sockets. Are everyone referring to BSD sockets when they say sockets – Laksith Jul 12 '15 at 23:26
-
Not per se. There are different socket implementations out there. – Philip Stuyck Aug 08 '15 at 16:24