https://github.com/cyb3r-jak3/server_client
Simple server client in python3
https://github.com/cyb3r-jak3/server_client
python python3 pythonserver pythonthreading server threading
Last synced: about 2 months ago
JSON representation
Simple server client in python3
- Host: GitHub
- URL: https://github.com/cyb3r-jak3/server_client
- Owner: Cyb3r-Jak3
- License: mit
- Created: 2018-04-24T19:54:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-28T21:48:58.000Z (almost 8 years ago)
- Last Synced: 2025-03-06T03:31:41.367Z (over 1 year ago)
- Topics: python, python3, pythonserver, pythonthreading, server, threading
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
- License: LICENSE
Awesome Lists containing this project
README
# server_client
## coolaspie
#### Written for python 3+
---
This is designed as a demo for using socket in python.
Both versions allow for multiple clients.
I am leaving V1 in as I believe that it is easier to understand for starting sockets.
V2 is the one I will continue to develop
There are currently two modes, the first one is the client sending messages to the server which writes them to stuff.txt. The second mode is a random number guessing game where the client guesses number from 1 to 10.
To use:
```
git clone https://github.com/coolaspie/server_client.git
```
To run:
```
python3 server.py
python3 client.py
```
(Quick note: You will two separate terminals sessions. 1 for server and 1 for client)
1. Mode0:
- Send Text: The client connect to the server and sends text to the server which writes it out in stuff.txt. Type "break" to end the session
2. Mode1
- Random Number Game: Client sends a number (currently between 1 & 10) and when the correct number is guessed the session ends.