-2

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

Laksith
  • 354
  • 3
  • 20
  • 1
    You may find this useful http://stackoverflow.com/questions/152457 and for information on datagrams (UDP) versus streaming data, Bing is your friend. – Peter Wone Oct 22 '15 at 11:36

1 Answers1

2

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.

Philip Stuyck
  • 7,344
  • 3
  • 28
  • 39