Skip to content

A simple TCP Multi-Client server, developed while studying socket programming in python. Models both the server side and client side. Connect to a Echo server using multiple connections - also working on mobile using Pydroid!

Notifications You must be signed in to change notification settings

YanivWein24/TCP_Server_Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Requirements :

  • Python 3.0 or above.
  • Download the code or clone it to your local repository.
  • (optionary) Assign your ipv4 address.
  • (optionary) Assign your preferred PORT number.

Assigning IPV4 Address And PORT Number:

By default, the server and the client are both set to "localhost" at port 5050.

To find Your own ipv4 adrress, open the command-line and type ipcondig.
Now under "Wireless LAN adapter || Wi-Fi:" you can find:
IPv4 Address. . . . . . . . . . . : xxx.xxx.xxx.xxx

To use your own ipv4 address and port number, locate the "SERVER" and PORT variables on both TCP_Server.py and TCP_Client.py:

SERVER = "localhost"
PORT = 5050

Here you can insert your own address and port number

- SERVER = "localhost"
+ SERVER = "Your ipv4 address"

- PORT = 5050
+ PORT = your_port_number

Run On Mobile:

This code can also get executed on mobile using Pydroid3!
You can run both the server side and client side on your mobile device, and connect between different devices!
To do so, copy the files to your mobile storage, and follow the instructions above ( using Pydroid3 editor ).

If you wish to connect with multiple devices, make sure that all the devices are connected to the same network.

Screenshots :

Server side - Listen for connection:
Listen

Server side - auto close when all connections are closed:
Auto-close

Client side - menu:
client-menu

Client side - echo response:
Client-response

Client side - asking for time:
Client-time

Server side - asking for time:
Client-time

About

A simple TCP Multi-Client server, developed while studying socket programming in python. Models both the server side and client side. Connect to a Echo server using multiple connections - also working on mobile using Pydroid!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages