0% found this document useful (0 votes)
49 views38 pages

Client Server Computing - 2021: Dipesh Rijal - HND Forth Semester

This document provides an overview of client-server computing. It defines client-server as a model where client processes request services from server processes. The document then discusses advantages like centralization, security, and scalability, as well as disadvantages such as traffic congestion and costs. It illustrates how clients and servers communicate through TCP sockets and pipes. It also compares parent and child processes, and covers concepts like PID, PPID, and application layer protocols like SMTP, FTP, and HTTP. The document aims to explore client-server concepts and analyze communication processes to help upgrade a company's IT system architecture.

Uploaded by

Ashish Dhungana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views38 pages

Client Server Computing - 2021: Dipesh Rijal - HND Forth Semester

This document provides an overview of client-server computing. It defines client-server as a model where client processes request services from server processes. The document then discusses advantages like centralization, security, and scalability, as well as disadvantages such as traffic congestion and costs. It illustrates how clients and servers communicate through TCP sockets and pipes. It also compares parent and child processes, and covers concepts like PID, PPID, and application layer protocols like SMTP, FTP, and HTTP. The document aims to explore client-server concepts and analyze communication processes to help upgrade a company's IT system architecture.

Uploaded by

Ashish Dhungana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

CLIENT SERVER COMPUTING | 2021

Contents
PART 1 ...................................................................................................................................... 3

Introduction: ............................................................................................................................... 4

General Statement: ................................................................................................................. 4

Theses Statement: ................................................................................................................... 4

Report......................................................................................................................................... 5

Introduction ............................................................................................................................ 7

Definition of Client-server ..................................................................................................... 7

Client-Server protocol ............................................................................................................ 8

Advantages and disadvantages of the client-server model..................................................... 8

Advantages of Client Server Network: .................................................................................. 8

1. Centralization: ................................................................................................................. 8

2. Security: .......................................................................................................................... 8

3. Scalability: ...................................................................................................................... 8

4. Management:................................................................................................................... 8

5. Accessibility:................................................................................................................... 9

Disadvantages of Client Server Network: .............................................................................. 9

1. Traffic Congestion: ......................................................................................................... 9

2. Robustness: ..................................................................................................................... 9

3. Cost: ................................................................................................................................ 9

4. Maintenance: ................................................................................................................... 9

5. Resources: ....................................................................................................................... 9

Illustration of Client-Server Communication through TCP Sockets: .................................. 10

Illustration of Client-Server Communication through Pipe: ................................................ 11

Comparison between Parent process and Child process: ..................................................... 12

PID and PPID ....................................................................................................................... 13

Concept and Functions Application layer Protocols: ........................................................... 14

1
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

SMTP (simple Mail transfer protocol): ................................................................................ 15

TELNET (Terminal Network): ............................................................................................ 16

FTP (File Transfer Protocol): ............................................................................................... 17

POP (Post office Protocol): .................................................................................................. 18

HTTP (Hypertext Transfer Protocol): .................................................................................. 19

Different windows in the Wireshark interface: .................................................................... 19

Conclusion: .............................................................................................................................. 24

PART 2 .................................................................................................................................... 25

Introduction: ............................................................................................................................. 26

UDP system in Linux: .......................................................................................................... 26

TCP system in Linux:........................................................................................................... 32

Conclusion: .............................................................................................................................. 37

2
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

PART 1
LO1 Explore the concepts of servers, clients, and processes and the differences between
PPID and PID.

LO2 Analyze the communication processes between clients and servers in different
application protocols with records captured from the internet.

3
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Introduction:
General Statement:
Client/Server is a term utilized to depict a computing model for the improvement of
computerized systems. This model is based on the distribution of functions between two sorts
of free and autonomous processors: servers and clients. A client is any process that requests
specific services from server processes. A server is a process that provides requested
administrations for clients. Client and server processes can reside in the same computer or
completely different computers associated with a network.

Theses Statement:
Nepal IT solution is the foremost IT service provider company established by private investors.
The promoters of the company are a group of well-known IT experts, businessmen, and
business houses of Nepal. Within the 12 years of operation, the Company has set up an
excellent business record and has a strong financial position. To meet the growing customer
needs and market demands, the company expanded its system and network infrastructure to
provide services like email service, Internet service, Domain registration, Web hosting, and
Network Management and Monitoring service, Company wants to upgrade the system by
improving IT skills of their staffs by training. Nepal IT solution has hired me as a junior system
administrator to design and implement most suitable system architecture solution for their
business. My major responsibilities are to plan, manage, design, implement and optimize the
system and network that fulfill the company's current needs. Following report will illustrate the
communication processes between servers and clients and compare parent process and child
process and many more according to scenario.

4
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Report on:

“Illustration of client server communication through TCP sockets and Pipe”

Prepared By: Dipesh Rijal

5
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Table of Content:

1. Introduction
2. Definition of client-server
3. Client-server protocol
4. Advantages and disadvantages of client-server
5. Illustration of client-server communication through TCP socket
6. Illustration of client-server communication Pipe
7. Parent process & Child process
8. PID & PPID
9. Application layer protocol

6
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Introduction
This report covers information and advancements with respect to the communication strategies
between servers and clients, as well as information on diverse application protocols. To begin
with and vitally, the client-server communication process will be clarified which will be done
by examining different thoughts of servers, clients, and processes. This report will indeed cover
the concept and capacities of a few application layer protocols. The communication processes
of Application layer protocols will be included in detail. I will indeed show the screenshots of
Wireshark packet captures which is helpful to analyze the communication records captured.

Definition of Client-server
Before we dig deep into how client-server communicate, we have to go through its basic. A
Client-server is a relationship in which one program (the client) demands a benefit or asset
from another program (the server). At the turn of the last century, the name client-server was
utilized to recognize disseminated computing by individual computers (PCs) from the
monolithic, centralized computing model utilized by mainframes. The client-server has gotten
to be one of the fundamental concepts of network computing because it includes the server
satisfying a request made by a client. In this case, the client connects to the server over a LAN
or Wan, such as the Internet. The association is stopped once the server has completed the
client's request. (Robert, 2017)

Fig1: Client-server communication

7
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Client-Server protocol
A communications protocol is set of rules which gives a structure for requests between client
and server in a network. For case, the web browser within the user's computer (the client)
employs the HTTP protocol to ask for information from the website on a server. The TCP/IP
protocol is commonly utilized by clients to associate with servers. TCP is a connection-oriented
protocol, which implies it builds up and keeps up a connection until both sides' application
programs have done trading messages. It decides how to break down application information
into network-deliverable bundles, sends and receives bundles from the network layer, oversees
flow control, and handles resend of dropped or harmed bundles, as well as it's doing the job of
acknowledging all bundles that arrive. Each bundle of information that goes over the Web is
considered as an isolated block of information with no connection to other units of information.
TCP is dependable for the bundles being set within the adjusted arrangement. IP has been found
in layer 3 of the OSI communication worldview, which is the Networking Layer. (kenna, 2015)

Advantages and disadvantages of the client-server model:

Advantages of Client Server Network:


1. Centralization: The main advantage of client server network is the centralized control
that it is integrated with. All the necessary information are placed in a single location.
This is especially beneficial for the network administrator since they have the full
control over management and administration.
2. Security: In a client-server network, the data is well secured due to its centralized
engineering. It can be implemented with access controls such that only authorized
clients are allowed access. One such strategy is forcing credentials like username and
password. Additionally, if the information were to be misplaced, the records can be
effortlessly recovered from a single reinforcement or backup.
3. Scalability: Client-server networks are profoundly scalable. At whatever point the
client needs they can increase the number of assets such as clients and servers. Hence,
expanding the size of the server without any intrusions. Indeed in case, the size gets
expanded, there's no delay around permission to network assets since the server is
centralized. Subsequently, a very less number of staff are required for the setups.
4. Management: Since all the files are stored in the central server, it is rather easy to
manage files. In client server network has the best management to track and find records
of required files.

8
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

5. Accessibility: Irrespective of the geographical area or the platform, each client is given
the opportunity to log into the system. In this way, all the representatives will be able
to get to their corporate pieces of data without requiring to utilize a terminal mode or a
processor. (smith, 2019)

Disadvantages of Client Server Network:


1. Traffic Congestion: The essential disadvantage of a client-server network is the
traffic congestion it experiences. In case too many clients make requests from
the same server, it'll result in crashes or slowing down of the connection. An
over-burden server makes numerous issues in getting to pieces of data.
2. Robustness: In case if the main server happens to undergo failure or
interference, then the whole network will be disrupted. Therefore, client server
networks lacks on the side of robustness.
3. Cost: The cost involved in setting up and maintaining the server is usually high
in client server network as it does on the network operations. Since the networks
are powerful they can be expensive to purchase. Hence, not all the users will be
able to afford them.
4. Maintenance: When the servers are implemented, it is going to work non-stop.
Which means it must be given proper attention. If there are any problems, it
must be resolved immediately without any delay. Hence, there should be a
specialized network manager appointed to maintain the server.
5. Resources: Not all the resources that is present on the server is acquirable. For
an example, it is not possible to print a document on the web directly or edit any
information on the client hard disk drive. (smith, 2019)

9
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Illustration of Client-Server Communication through TCP Sockets:


A socket is one endpoint of a two-way communication link between two programs running on
the network. A socket is bound to a port number so that the TCP layer can identify the
application that data is destined to be sent to. Ordinarily, a server runs on a particular computer
and includes a socket that's bound to a particular port number. The server just holds up, tuning
in to the socket for a client to create a connection request. On the client-side: The client knows
the hostname of the machine on which the server is running and the port number on which the
server is listening. To form a connection request, the client tries to meet with the server on the
server's machine and port. The client moreover must identify itself to the server so it binds to
a neighborhood port number that it'll utilize during this connection. (gray, 2007)

If the connection is accepted on the client side, a socket is created successfully, and the client
can use the socket to communicate with the server. The client and server can now communicate
with one other by writing to or reading from their respective sockets. A server creates a socket,
assigns it an IP address and port number (for TCP and UDP), and then listens for connections.
A new socket is established for communication with the client when a client connects to the
server (TCP only). To identify if any activity has occurred on any of the open sockets, a polling
mechanism is implemented.

Fig2: Stock

10
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Illustration of Client-Server Communication through Pipe:


A Pipe is a technique used for inter-process communication. A pipe is a component by which
the output of one process is coordinated into the input of another process. In this way, it gives
a one-way stream of data between two related processes. In spite of the fact that pipe can be
accessed like a standard file, the system really manages it as a FIFO (first input, first output)
queue. A pipe file is created utilizing the pipe system call. A pipe has an input end and an
output end. One can compose into a pipe from the input end and studied from the output end.
A pipe descriptor has an array that stores two pointers, one pointer is for its input end and the
other pointer is for its output end. If the client and server need to talk to one other. It is critical
that the process that writes closes the pipe's read end and the process that reads closes the pipe's
write end. The following should occur during client-server connection. The client should keep
the write end of the pipe open while closing the read end. The read end of the server should
remain open, while the writing end should be closed. (eanvas, 2020) Suppose two processes,
Process A and Process B, need to communicate. In such a case, it is important that the process
which writes, closes its read end of the pipe and the process which reads, closes its write end
of a pipe. Essentially, for a communication from Process A to Process B the following should
happen.

 Process A should keep its write end open and close the read end of the pipe.
 Process B should keep its read end open and close its write end. When a pipe is created,
it is given a fixed size in bytes.

Fig3: pipe

11
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Comparison between Parent process and Child process:


 Parent Process: All the processes within the operating system are created when a
process executes the fork () system call except the startup process. The method that
utilized the fork () system call is the parent process. In other words, a parent's process
is one that makes a child process. A parent process may have numerous child processes
but a child process only one parent process. On the victory of a fork () system call, the
PID of the child process is returned to the parent process and is returned to the child
process. On the disappointment of a fork () system call, -1 is returned to the parent
process and a child process isn't created. (mcgrayy, 2006)
 Child Process: A child process is a process created by a parent process in operating
system using a fork () system call. A child process may also be called a sub process or
a subtask .A child process is created as its parent process’s copy and inherits most of
its attributes. If a child process has no parent process, it was created directly by the
kernel. (smith, 2019)

Fig4: Parents process & child process

12
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

PID and PPID:

PID:

Process identifier, moreover known as process ID or PID, is a one-of-a-kind number to


distinguish each process running in a working system. PIDs are reused over time and can only
identify a process amid the lifetime of the process, so it does not distinguish processes that are
not running. If you ever need to kill a process, for example, you can refer to it by its PID. Since
each PID is unique, there is no ambiguity or risk of accidentally killing the wrong process
(unless you enter the wrong PID). (bela, 2006)

PPID:

In addition to a unique process ID, each process is assigned a parent process ID (PPID) that
tells which process started it. The PPID is the PID of the process's parent. For example, if
process1 with a PID of 101 starts a process named process2, then process2 will be given a
unique PID, such as 3240, but it will be given the PPID of 101. It's a parent-child relationship.
A single parent process may spawn several child processes, each with a unique PID but all
sharing the same PPID. (bela, 2006)

Fig5: PID & PPID

13
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Concept and Functions Application layer Protocols:


An application layer protocol characterizes how application processes (clients and servers),
running on diverse end systems, pass messages to each other. In specific, an application layer
protocol characterizes: (jiang, 2021)

 The sorts of messages, e.g., request messages and response messages.


 The sentence structure of the different message types, i.e., the areas within the message
and how the areas are delineated.
 The semantics of the areas, i.e., the meaning of the data that the field is assumed to
contain;
 Rules for deciding when and how a process sends messages and responds to messages.

Below table shows the application type and application-layer protocol type that application use:

Application Application-layer protocol

Electronic mail (E-mail) Send: Simple Mail Transfer Protocol SMTP [RFC821]
Receive: Post Office Protocol v3 POP3[RCF1939]

Remote terminal access Telnet [RFC854]

World Wide Web (WWW) Hyper-Text Transfer Protocol 1.1 HTTP 1.1[RFC 2068]

File transfer File Transfer Protocol FTP[RFC 959]


Trivial File Transfer protocol TFTP[RFC1350]
Remote file server NFS [McKusik1996]

Streaming multimedia Proprietary (e.g. Real Networks)

Internet telephony Proprietary (e.g. Vocaltee)

An application layer protocol is rather like any other protocol with its own syntax, semantics,
and rules. As long as two machines get the same application layer protocol, the machines ought
to be able to communicate meaningfully for a particular reason. This protocol is composed of
high-level languages like C, Java, etc. The application layer gives numerous administrations
which are given underneath:

14
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

 SMTP
 Telnet
 FTP
 POP
 HTTP

SMTP (simple Mail transfer protocol):


A set of communication guidelines that allow software to transmit an electronic mail over the
internet is called Simple Mail Transfer Protocol, used for sending messages to other computer
users based on e-mail address. It provides a mail exchange between users on the same or
different computers, and it can send a single message to one or more recipients, sending
message can include text, voice or graphic. The main purpose of SMTP is utilized to set up
communication rules between servers. The servers have a way of recognizing themselves and
declaring what kind of communication they are attempting to perform. They moreover have a
way of taking care of the mistakes such as incorrect mail addresses. For illustration, in the case,
the recipient address is wrong, at that point receiving server answers with an error message of
some kind. (jones, 2008)

Following the client/server model:

 SMTP has two sides; a client-side which executes on a sender's mail server, and a
server-side which executes on the recipient's mail server.
 Both the client and server sides of SMTP run on each mail server.
 When a mail server sends mail (to other mail servers), it acts as an SMTP client.
 When a mail server gets mail (from other mail servers), it acts as an SMTP server.

15
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig6: SMTP

TELNET (Terminal Network):


Telnet is an application protocol utilized on the Web or local zone network to supply a
bidirectional interactive text-oriented communication facility using a virtual terminal
association. User information is blended in-band with Telnet control data in an 8-bit byte-
oriented (character-oriented protocol.) data association over the Transmission Control
Convention (TCP). It uses the NVT (Network Virtual Terminal) system to encode characters
on the local system, and on the remote server, NVT decodes the characters to a form acceptable
to the remote machine. Many application protocols are built upon the TELNET protocol.
(jones, 2008)

16
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig7: TELNET

FTP (File Transfer Protocol):


FTP is the standard mechanism provided by TCP/IP for copying a file from one host to another,
it differs from other client-server application because it establishes two connections between
the hosts i.e. data connection and control connection (data connection uses PORT 20 and
control connection use PORT 21). It's built on a client-server architecture and uses separate
control and data connections between the client and the server, one connection is used for data
transfer, the other is used for control information (commands and responses). It transfer data
reliably and efficiently. (jones, 2008)

17
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig8: Working Principle of FTP

POP (Post office Protocol):


Also known as POP3, is a protocol used by a mail server in conjunction with SMTP to receive
and holds mail for the hosts. It receives e-mails and filters them into the appropriate user
folders. When a user connects to the mail server to retrieve his mail, the messages are
downloaded from mail server to the user's hard disk. (jones, 2008)

Fig9: POP3

18
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

HTTP (Hypertext Transfer Protocol):


This protocol is mainly used to access data on the WWW (World Wide Web), it’s the main
application-layer protocol of the web. It transfer the data in the form of plain text, hyper text,
audio, and video and so on. It utilizes TCP connections to send client request and server replies.
(jones, 2008)

Fig10: HTTP

Different windows in the Wireshark interface:


Wireshark is an open-source network protocol analysis software program started by Gerald
Combs in 1998. A global organization of network specialists and software developers support
Wireshark and continue to make updates for new network technologies and encryption
methods. Wireshark is a packet sniffer and analysis instrument. It captures network activity in
the local network and stores that information for offline examination. Wireshark captures
network activity from Ethernet, Bluetooth, Wireless (IEEE.802.11), Token Ring, Frame Relay
connections, and many more. (petters, 2020) I have shown the different windows in Wireshark
interface below:

19
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

S.N Description Screenshot


1. Welcome page: It is the
primary page of the
Wireshark interface
which shows many
options for capturing
data. We are able to
capture information of Fig11: Welcome page of Wireshark
many alternatives like
Wi-Fi, Local Area
Connection, Ethernet,
etc.
2. Wireshark Main
window: We will see
many parts in the
Wireshark interface.
Moreover, we are able to
see a menu bar, Toolbar,
Status bar, and
numerous more.

Fig12: Wireshark main window

20
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

3. The menu bar: The main


menu of Wireshark can
be found at the top of the
main window. The
menu bar of Wireshark
contains things like
record, edit, view,
capture, analyze, etc.

Fig13:Menu bar of Wireshark


4. Toolbar: The toolbar
gives you simple access
to the menu's most
commonly utilized
things. The user cannot
edit this toolbar. Be that
as it may, it can be
covered up utilizing the
View menu in case extra
screen space is required
to display packet
information. Like their
Fig14: Main toolbar of Wireshark
particular menu items,
things within the toolbar
will be enabled or
disabled. The main
window toolbar, for
illustration, can be seen
once a file has been
opened in the picture

21
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

underneath. Different
file-related buttons are
empowered, but the stop
capture button is
disabled since there's no
capture right now in the
picture above.
5. Filter toolbar: The filter
toolbar permits you to
quickly change and
apply display filters,
such as the DHCP
channel that appeared in
fig. The bookmark
symbol signifies saved
display filters in this
toolbar, followed by the Fig14: filter toolbar
filter input, which is
then placed to enter or
change a display filter
string whereas a syntax
check is performed
while writing. If the
entered string is invalid
or fractional, the display
filter's background turns
red. Tap the enter or
apply button to apply the
string. At that point,
there's the clear symbol,
which clears the edit
area and resets the filter.
The apply button is

22
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

utilized to apply the


display filter, whereas
the recent button
displays a list of filters
that have been applied
recently.
6. Packet list pane: Each
packet in the capture file
corresponds to a line in
the packet list. If you
choose a line in this
pane, the “Packet
Details” and “Packet
Bytes” panes will
display further Fig15: Packet list pane
information.
7. The Packet Detail pane:
The protocols and
protocol fields of the
packet selected in the
"Packet List" pane are
displayed in this pane.

Fig16: Packet detail pane

23
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

8. The status bar:


Informational messages
are displayed in the
status bar.

Fig17: Status Bar

Conclusion:
In this portion, I portrayed the communication process between servers and clients then I have
moreover depicted the methods of the communication process. After that, I compared the
parent process and child process in detail conjointly compared PID and PPID in detail. Then I
portrayed the concept and functions of application layer protocols. Then I altogether portrayed
the windows of Wireshark and how it captured the traffic.

24
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

PART 2
LO3 Create a client/server model in a Linux system with User Datagram Protocol (UDP),
Transmission Control Protocol (TCP) and Application Layer protocols

25
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Introduction:
This part is all about creating a client/server model in a Linux system with UDP (User
Datagram Protocol) and TCP (Transmission Control Protocol) So, I am progressing to show
the codes and output that I have utilized to make a UDP & TCP system in Linux.

UDP system in Linux:


User Datagram Protocol (UDP) is a communications protocol that's fundamentally utilized to
set up low-latency and loss tolerating connections between applications on the web. UDP
speeds up transmissions by empowering the transfer of data before an agreement is given by
the receiving party. As a result, UDP is advantageous in time-sensitive communications,
counting voice over IP (VoIP), domain name system (DNS) lookup, and video or sound
playback. (Alastir, 2017)

Fig18: UDP Socket


The UDP Server to begin with makes a UDP Socket, then binds the socket to the server address,
and after that holds up for the datagram to be sent by the client. The server at that point
translates the datagram packet and reacts to the client. The UDP Socket is additionally made
within the UDP Client, and the client sends a message to the server and holds up for a response,
and after that sends another message to the server and holds up for a reaction, and at last, the
client cancels the session with the exit. Below are the code of UDP client & UDP server, which
I have used to create UDP system in Linux.

26
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig19: UDP code

27
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

28
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig20: UDP code

29
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig21:UDP code

30
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig22: UDP CODE

Fig23: UDP code

31
Dipesh Rijal | HND Forth Semester
CLIENT SERVER COMPUTING | 2021

Fig24: UDP output

TCP system in Linux:


TCP stands for Transmission Control Protocol a communications standard that enables
application programs and computing devices to exchange messages over a network. It is
designed to send packets across the internet and ensure the successful delivery of data and
messages over networks. The timeline underneath portrays the ordinary situation that happens
between a TCP client and a server. The server is begun first, and after that, a client that
interfaces to the server is begun a while later. We'll expect that the client submits a request to
the server, which the server processes, and after that sends the client response. This continues
until the client stops the connection, at which point the server receives an end-of-file notice.
The server at that point closes or holds up for a new client connection before closing its
conclusion of the connection. (Alastir, 2017)

Fig25: TCP SOCKET

Let’s see the code for TCP Client and TCP Server to create TCP system in Linux.

32
Dipesh Rijal | HND Forth Semester
Client server computing | 2021 2021

Fig27: TCP server code

Fig28: TCP server code

33
Dipesh Rijal (HND / Fourth Semester)
Client server computing | 2021 2021

Fig30: TCP server code

Fig31: TCP SERVER CODE

34
Dipesh Rijal (HND / Fourth Semester)
Client server computing | 2021 2021

Fig32: TCP client code

Fig: 33 client code

35
Dipesh Rijal (HND / Fourth Semester)
Client server computing | 2021 2021

Fig34: Client code

Fig35: server side Output

36
Dipesh Rijal (HND / Fourth Semester)
Client server computing | 2021 2021

Fig36: client side output

Conclusion:
In this part, I have designed a client/server model in a Linux system with user datagram protocol
(UDP) and transmission control protocol (TCP). At first, I created UDP system then I created TCP
system and shows client and server-side code and its output.

37
Dipesh Rijal (HND / Fourth Semester)
Client server computing | 2021 2021

References
Alastir. (2017, 10 6).

bela, v. (2006, 04 11).

eanvas, D. (2020, 5 14).

gray, c. (2007, 10 17).

jiang, m. (2021, nov 2).

jones, s. (2008, 12 10).

kenna, l. (2015, 10 02).

mcgrayy, k. (2006, 01 02).

petters, j. (2020, 18 9).

Robert, B. (2017, 04 20).

smith, a. (2019, 09 10).

38
Dipesh Rijal (HND / Fourth Semester)

You might also like