Giter Club home page Giter Club logo

remoteadv's People

Contributors

ntpeters avatar xjzhang2037 avatar

Watchers

 avatar  avatar  avatar  avatar

remoteadv's Issues

Clients do not exit cleanly when server dies

If the server dies unexpectedly while there are still clients attached to it, they do not exit cleanly.

This is fixed for the slave, but I haven't found a good way of doing this for the master client yet though.
The issue with master is that since it has a menu and is awaiting user input via scanf, I haven't found an easy way for it to detect if the server connection is lost until a command is issued. Apparently when a socket connection is broken, a SIGPIPE signal is supposed to be issued, but I have had no luck in catching it so far. I'm not sure if this is due to me running this all locally rather than over then internet or not. Worth looking into more.

Remove deprecated functions

We should check for any deprecated functions in our code and update them to their current counterparts. I'd say there's no rush on this, but it is something that should be taken care of at some point.
For example: Using memset() rather than bzero(). Using getaddrinfo() rather than gethostbyname(). This sets errno appropriately and would remove the need to check herror.

Convert to and from network byte order

Since we are going to be doing this over the internet, we need to convert to and from network byte order where appropriate.

I tried testing this by running the server on my EC2 instance, and running a slave client on Guardian and the master client on my laptop. The clients were unable to connect to the server, so I'm thinking this may be the issue. It may not be, and if the problem persists after this task is completed I'll post it as a bug to look into.

Update threading model to pthreads?

Not sure if we would want to bother with this. Forking is an older threading model for servers and pthreads would be a more modern way of approaching it. I figure if we have time and want to learn a little about pthreads, then go for it. Otherwise, don't bother. This would also be something that we could hold off on for awhile, like until we have most other things working.
I found a sample server written using pthreads here: http://kturley.com/simple-multi-threaded-web-server-written-in-c-using-pthreads/

Implement slave-side commands

Implement the backend for the commands that the slave can receive. (open, close, read, write, exec, etc...) Add any others that may be useful, but don't have skeletons already.
These probably won't be used as bare commands from the master client, and will rather be part of other actions that we add to the master later on.

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.