\chapter{Main protocols in programming for communication}
We'll talk about how many protocols that we can use in Programming.

\section{Ethernet}
Some people say this is physical protocol. I doubt that. Even if they are running inside a copper wire, you still have to use a digital device to handle it, and that device needs to be programmed.

\section{IP}
IP is stand for \textbf{Internet Protocol}.

It's a set of rules for sending data across a network.

But for me, I thought it as an identification for a specific computer, with it, you are able to visit or access any computer in this world through the internet.

\section{UDP}
UDP stands for \textbf{User Datagram Protocol}.

With UDP, computer applications can send messages, in this case, referred to as datagrams, to other hosts on an Internet Protocol (IP) network.

But UDP is not reliable. UDP applications must be willing to accept some packet loss, reordering, errors or duplication.

Most often, UDP will be used on \textbf{Streaming Media}, \textbf{Real-time Multiplayer Games} and \textbf{Voice Over IP (VoIP)}. Because for those applications, loss of packets is not usually a fatal problem.

\section{TCP}
TCP refers to \textbf{Transmission Control Protocol}.

TCP provides reliable, ordered, and error-checked delivery of a stream of bytes between applications running on hosts communicating via an IP network. Major internet applications such as the \textbf{World Wide Web}, \textbf{Email} rely on TCP.

This is a popular protocol. Many other protocols are based upon it.

\section{HTTP}
HTTP refers to \textbf{Hypertext Transfer Protocol}.

It is used to represent information online.

I can't emphasize how important it is. It is the fundamental of modern networks. 

Websites are the final product that uses HTTP protocol. 

\section{HTTPS}
It is an upgraded version of HTTP. It uses some technique to make HTTP transfer secure.

So for the next decade, if you see anyone still using the pure HTTP protocol, it is unsafe. The data that was been transferred though that protocol may get leaked to bad guys.

\section{socket}
Technically, it's not a protocol, it's just a name for an endpoint.

In practice, socket usually refers to two endpoints in an IP network. It is used as a terminology for one-to-one connections.

\section{WebSocket}
Instead of using a socket directly with a system programming language such as Python, sometimes people also wanna create a point-to-point connection with a browser (website).

That's where WebSocket comes from, it is a protocol used for creating a socket connection upon website or browsers.