Introduction

This lab is all about socket programming, plus point would be to study about HTTPS also to get a better understanding between the socket programming and https

Socket Programming

<aside> 💡 HTTPS : slow yet it need connection from both side … lets see about what is socket programming

</aside>

Socket programming is a way of connecting two nodes (server to server connection) on a network to communicate each other using sockets.

Sockets are an interface that programs use to send and receive message across a network.

There are two types of Sockets : TCP and UDP

TCP vs UDP

Code in python

socket() —> default will follow the IPv4 (there are difference in protocols)

bind() —> with which client you will bind first parameter (Ip address , port number)

listen() —> how many clients we will listen i.e. listen 5 means conversation with 5 clients

accept() —> message accept request or reject