GithubHelp home page GithubHelp logo

cnt-project's People

Contributors

jbtt avatar kalgynirae avatar rcorre avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cnt-project's Issues

Peer FSM

The logic for the peer FSM should be in peer.h. This will likely provide a general loop where the peer waits for certain types of messages, transitions between states based on received messages, and sends messages of their own. This should focus primarily on the higher-level state-transition logic and contain minimal logic about how to actually send a message or parse a received message, as that logic should be abstracted away to sender.h and receiver.h.

Midpoint Submission

I tweaked the README and Makefile for submission. Take a look at 45263c0 and let me know if you want to change anything. I'll submit it later today.

Lets all start posting issues

Can we all start posting issues to keep track of what needs to be done and what's currently being done?
I'm ready to start implementing something new but I don't want to start working on something somebody else is already doing.

Sign up for demo time slot

Demos are 3-5PM Dec. 6 and 9-11AM Dec. 9.
Normally I'd say get it over with as soon as possible, but considering the exam is Wednesday Dec.11th anyways, it might be best to pick the later date so we have more time to prepare.

Message sending helper functions

I'm planning to add helper functions to abstract away the process of generating and sending a message of any type. These would be added to message.c. Ideally this should allow the peer FSM section to focus on logic about state management without worrying about the logistics of how to send a message.
These functions would probably take a file descriptor that would have been previously generated by a call to make_socket_to_peer.

Can't connect machines using main method

The main method is using open_socket_and_listen, which fails. However, make_socket_to_peer, which is used in the tests, works. Can anyone can look into why this is and how to make it work?

Bitfield management

@jbtt, when implementing the receiver functions I realized that the bitfield parsing function I gave you won't work. I thought a long would have enough bits, but after doing the math with the example config file it turned out there would be over 300 pieces. We can't reasonably store this in any standard type, we'll probably have to do something like create a char[], and use mod 8 of the piece index to get the array index before performing bit math.

Make this repository public?

In a few months my GitHub account will lose its student status and I won't be able to have private repositories any more. Anyone have any reasons why I shouldn't switch this repo to public?

Message receiving helper functions

Functions in receiver.h will be responsible for interpreting received messages. They should take in raw data received from a socket and parse it into useful information. This includes differentiating handshake and normal messages, extracting the type from a normal message, and providing message-type specific parsing functions, such as extracting the bitfield from a BITFIELD message or the piece index from a HAVE/REQUEST message.

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.