kalgynirae / cnt-project Goto Github PK
View Code? Open in Web Editor NEWhttp://www.cise.ufl.edu/~yx1/teaching/CNT4007C_F13/project_description.pdf
http://www.cise.ufl.edu/~yx1/teaching/CNT4007C_F13/project_description.pdf
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.
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.
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.
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.
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.
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?
@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.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.