Vinod Kumar
3 min readAug 22, 2021

--

Task_3

Creating Live Streaming Video Chat App without voice using cv2 module of Python

Hello Connections…

🤷‍♂️ I am here with team task 3 from the #summertraining under the Mentorship of Vimal Daga Sir.

Our team have tried Creating Live Streaming Video Chat App without voice using cv2 module of Python

Task Description: 📄

Create your own chat servers, and establish a network to transfer data using socket programing by creating both server and client machines as sender and receiver.

Few things to know :

What is a Server?

A server is either a program, a computer, or a device that is devoted to managing network resources. There are various types of servers such as database servers, network servers, print servers, etc.

What is a Client?

A client is either a computer or software that receives information or services from the server. In a client-server module, clients requests services from servers. The best example is a web browser such as Google Chrome, Firefox, etc.

Sharing of information from clients to server

Sockets

Sockets are the backbone of networking. They make the transfer of information possible between two different programs or devices. For example, when we open up a browser, we as clients are creating a connection to the server for the transfer of information. A single network will have two sockets, one for each communicating device or program. These sockets are a combination of an IP address and a Port. A single device can have ’n’ number of sockets based on the port number that is being used.

Some of the common methods,

socket(): This method is used to create the socket and takes two arguments first is a family or domain like AF_INET (IPv4) or INET6 (IPv6) and the second defines the type of sockets like SOCK_STREAM ( TCP ) or SOCK_DGRAM ( UDP ).

bind(): This method is used to bind your socket with a specific host and port which will be passed as an argument to this function and that means your socket will be sitting at a specific location where the client socket can send its data.

recvfrom(): This method can be used with a UDP server to receive data from a UDP client or it can be used with a UDP client to receive data from a UDP server. It accepts a positional parameter called bufsize which is the number of bytes to be read from the UDP socket. It returns a byte object read from a UDP socket and the address of the client socket as a tuple.

sendto(): It is a method of Python’s socket class that is used to send datagrams to a UDP socket. The communication could be from either side. It could be from client to server or from the server to a client. The data to be sent must be in bytes format. If the data is in string format, the str. encode() method can be used to convert the strings to bytes. We must also pass a tuple consisting of IP address and port number.

Socket Programming

Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while the other socket reaches out to the other to form a connection. The server forms the listener socket while the client reaches out to the server.

UDP:

User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there is no need to establish a connection prior to the data transfer.

Features of UDP

· Supports bandwidth-intensive applications that tolerate packet loss

· Less delay

· It sends the bulk quantity of packets.

· Possibility of data loss

· Allows small transaction (DNS lookup)

✍ You can get the code in the link given below:

https://github.com/Vinod-AI/Task_3_chat_app.git

#vimaldaga #righteducation #educationredefine #rightmentor #worldrecordholder #linuxworld #makingindiafutureready #righeducation #summertraining

--

--