Giter Site home page Giter Site logo

server_client's Introduction

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.

server_client's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.