Professional Documents
Culture Documents
IN PYTHON
By
Class
SE
Guide Name
Date : 24/04/2020
Declaration
I declare that this written submission represents my ideas in my own words and
where others’ ideas or words have been included, I have adequately cited them and
referenced the original sources. I also declare that I have adhered to the principles
of academic honesty and integrity and have not misrepresented or fabricated or
falsified any idea/data/fact/source in my submission. I understand that any
violation of the above will be cause for disciplinary action by the institute and an
also evoke penal action from the sources which have thus not been properly cited
or from whom proper permission has not been taken when needed.
TABLE OF CONTENTS
Title
1. Introduction
2. Multithreading
3. Sockets
4. Server
5. Client
6. Output
Introduction
To attain a chat model which can perform many processes Or tasks at
same time with very low halting problem i.e. a Multi – Threaded Client
Server Chat Model. A thread is sub process that runs a set of commands
individually of any other thread. So, every time a user connects to the
server, a separate thread is created for that user and communication from
server to client takes place along individual threads based on socket
objects created for the sake of identity of each client. We will require
two scripts to establish this chat room. One to keep the serving running,
and another that every client should run in order to connect to the server.
SERVER
A server is either a program, a computer, or a device that is devoted to
managing network resources.
Servers can either be on the same device or computer or locally
connected to other devices.
There are various types of servers such as database servers, network
servers, print servers, etc.
Servers commonly make use of methods like socket.socket(),
socket.bind(), socket.listen(), etc to establish a connection and bind to
the clients.
CLIENT
A client is either a computer or software that receives information or
services from the server.
In a client-server module, clients requests for services from servers.
The best example is a web browser such as Google Chrome, Firefox, etc.
These web browsers request web servers for the required web pages and
services as directed by the user.
Other examples include online games, online chats, etc.
ADVANTAGES
Centralized system with all data in a single place.
The capacity of client and servers can be changed separately.
Cost efficient requires less maintenance cost and Data recovery is
possible.
DISADVANTAGES
Client are prone to viruses if present in the server or uploaded into the
server.
Server are prone to Denial of service(DOS) attacks.
Data Packets may be modified during transmission.
Multi-threading Modules
A _thread module & threading module is used for multi-threading in python,
these modules help in synchronization and provide a lock to a thread in
use.
from_thread import*
import threading
It is a privilege for us to have been associated with Ms. Rupali Sathe, our guide,
during this project work. We have been greatly benefited by his valuable
suggestions and ideas. It is with great pleasure that we express our deep sense of
gratitude to them for their valuable guidance, constant encouragement and patience
throughout this work.
We take this opportunity to thank all our classmates for their company during the
course work and for useful discussion we had with them. We would be failing in
our duties if we do not make a mention of our family members including our
parents for providing moral support, without which this work would not have been
completed.
Submitted By
Tanaya Thakur
Shraddha Tamhane