You are on page 1of 3

Introduction Nowadays the way things are done in the daily life has changed due to the popular

global emergence of the internet and WWW. Since the emergence of internet it has changed just about everything we do. This includes science, engineering, and commerce also the way of learning, and also communicating and interacting among others. Many of human daily life activities are revolving around the usage of internet, which includes but not limited to social media. People take the advantage of internet and use it for their business to make new ways of living by offering some of their services through the internet. This results in demands for software designers and engineers to create application that is able to work with Internet or making application that uses Internet platform. A good understanding of fundamental computer network programming models is needed in developing Internet enabled applications. The client-server paradigm Typical network application has two pieces: client and server Client: Server: Provides requested service to client Always running May also include a client interface Initiates contact with server (speaks first) Requests service from server For Web, client is implemented in browser; for e-mail, in mail reader

The fundamental of a network-based system consist of a server, client and a media for communication. The client machine is a computer that makes a request and the machine that offers the requested services is called the server machine. The media for communication can be wired or wireless network. Services Provided TCP service: connection-oriented: setup required between client, server reliable transport between sending and receiving process flow control: sender wont overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum bandwidth guarantees

UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or minimum bandwidth guarantees

The client makes a request to the server machine, which involves networking services offered by the transport layer which is part of the internet software stack. The TCP/IP stack is comprises of two types of protocols, TCP and UDP. Sockets are the most widely used interfaces for these protocols. HTTP, FTP, and Telnet are the examples of applications that uses TCP whereby it provides a reliable flow of data between 2 computers. Examples of UDP includes Clock server and PING, UDP protocol sends data packets independently these are called the datagrams from one computer to another but in UDP there are no guarantees of arrival and sequencing of data. Ports are use for both TCP and UDP protocols to map incoming data for a particular process running on a particular computer or machine.

Programming network at the transport layer is provided by Sockets. Network communication of file I/O operation is very similar to sockets, and socket handle is handled like file handle. Socket-based communication is independent of a programming language used for implementing it. A socket program written in Java language can communicate to a program written in nonJava (say C or C++) socket program. A server (program) runs on a specific computer and has a socket that is bound to a specific port. The server listens to the socket for a client to make a connection request.

Socket-programming using TCP

Client/server socket interaction: UDP

Socket is both application created and OS-controlled interface whereby applications can both sends and receives messages both to and from another application.

You might also like