In computing, network programming, essentially identical to socket programming or client–server programming, involves writing computer programs that communicate with other programs across a computer network. The program or process initiating the communication is called a client process, and the program waiting for the communication to be initiated is the server process.

It is A program that can act both as a client and a server is based on peer-to-peer communication.


http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CDMQFjAC&url=http%3A%2F%2Fhome.iitk.ac.in%2F~chebrolu%2Fee673-f06%2Fsockets.pdf&ei=BKNuUNbFBabfigL8j4CgDg&usg=AFQjCNEvSmF89aMWWyQiKnS90jm5BCHyQg&sig2=ozJDo5I2MXdD2d_XRsAUXw&cad=rja


http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=8&ved=0CGAQFjAH&url=http%3A%2F%2Fnet.pku.edu.cn%2F~course%2Fcs501%2F2011%2Fcode%2FBSD_Socket.t%2Fsockets.pdf&ei=BKNuUNbFBabfigL8j4CgDg&usg=AFQjCNHGoN6NHPQz23gL2sqcREjk44G_yA&sig2=ZEUW3ck_npZwwLyBtyk0mA&cad=rja