Giter Club home page Giter Club logo

client-server-interactive-shell's Introduction

#Muhammad Mujtaba Afzal 14882
Compile the server: gcc -o <name your exe> myserver.c -lpthread
Run the server: ./<name of your server exe>
The port number assigned would be visible.

Compile the client: gcc -o <name your exe> myclient.c -lpthread
Run the client: ./<name of your client exe> localhost <portnumber>

*exit the client by only pressing enter when prompted for input.
*delimiter for multiple commands in a line is ;
*input must not end with the delimiter.
*no space should be left when delimiting.
*not case sensitive

Valid commands on client side:
1. add <list of numbers separated by space>
2. sub <list of numbers separated by space>
3. mul <list of numbers separated by space>
4. div <list of numbers separated by space>
5. run <app name>
6. kill <pid/app name>
7. list
8. print <message>

Valid commands on server side:
1. print <message for all>
   sends a message to every client
2. send <pid> <message>
   sends message to a specific client
3. list
   displays list of all clients connected
4. listof <pid>
   displays list of processes run by a client

*valid Client commands: add 2 3
                        rUn gnome-calculator
                        kill 23098
                        kill firefox;print hello
			add 2 3;run gedit;sub 4 5
*Invalid Client command:add2 3
                        kill
			add 2 3;
			add 2 3 ; run gedit
                        print
*Valid Server Commands: list
		        print hello
                        send 1234 hello
			listof 1234

client-server-interactive-shell's People

Contributors

bitsplz 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.