Introduction to Network Programming

  • What is a network :-> Two or more computers that are connected to each other
  • Purpose of a network:-> sharing files and information between systems(computers)
  • How to create:-> Can be created connecting computers using ethernet cables,phone lines, and wireless networking cards

Internet is a global network of networks

Above is a brief description about networking. It is for the guys who have no idea about networking.



Just about everything on the network deals with client processes talking to server processes and vice-versa.
client ans server communicates with each other. client and the server can be two computers.
To communicate between two programmes in two different computers we use sockets. We send and receive data through sockets. There are several types of sockets.

Stream Sockets are reliable two-way connected communication streams.They are also be error-free.telnet applications use this.Web browsers use the HTTP protocol which uses stream sockets to get pages.
Datagram sockets are unreliable.if you send a datagram, it may arrive. It may arrive out of order. If it arrives, the data within the packet will be error-free.
And there are other sockets too.


Data is send throught the network packets of data.

example:

  1. the packet is wrapped in a header by the TFTP protocol
  2. then the whole thing is encapsulated again by the next UDP protocol
  3. then again by the next IP protocol
  4. then the final Ethernet protocol on the hardware (physical) layer 

** this is a brief discussion about networking. and this is for the newbies. hoping to post some useful articles in future.**

References : Beej's Guide to Network Programming Using Internet Sockets


















SHARE

Harsha Jayamanna

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment