Skip to content

busolbuse/Basic-Terminal-Messaging-with-Socket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Basic-Terminal-Messaging-with-Socket

Our aim in this project, we have implemented a simple messaging application. We connected Python's socket library functions to the appropriate port on the other computer.

Server-Client

images

The client-side (or simply, client) is the application that runs on the end-user computer; it provides a user-interface (UI) that handles what the application feels and looks like and how it interacts with end-user. It may employ and consume resources on the user's machine (computing device) such as temporary and local storage, etc. The server-side (or simply, server) is the application that receives requests from the clients, and contains the logic to send the appropriate data back to the client. Instead of user-interface, the server usually has an application programming interface (API). Moreover, the server often includes a database, which will persistently store all of the data for the application.

How it's work?

The server was stood up from our mainframe and made available for other users to connect to. Our main computer became the server and the other computer became the client. This allowed us to create a communication line between two different devices.

These steps take place respectively:

1-Python socket server program executes at first and wait for any request.

2-Python socket client program will initiate the conversation at first.

3-Then server program will response accordingly to client requests.

Messaging Time !!!

images images

WARNINGS

⚠️ It should be noted that when specifying the port in our code, a different open port number should be selected each time.

⚠️ If the socket client program is terminated; communication with the socket server program will also be terminated

Is it possible on a single computer?

Communication between code files:

This program can also be used to send data between different code files on the same computer.

images

Conclusion

images

Authorities:

Zeynep Çapak

Buse Berren Ünal