aergonus / comcast Goto Github PK
View Code? Open in Web Editor NEWNetwork Simulator following Caltech CS/EE143's Project for Cooper ECE303
License: MIT License
Network Simulator following Caltech CS/EE143's Project for Cooper ECE303
License: MIT License
Easier to track buffer occupancy
Isolates push to buffer (to include increment occupancy) and pop from buffer (to include decrement occupancy)
Change time of timeout events already in EPQ when TO (Timeout) is recalculated upon new estimate.
Replaced
// Reset timer;
with
tcpTO->invalidate();
tcpTO = new event_TO(TO,&this);
Also validate
// RETRANSMIT MISSING ACK. BUT WHICH ONE???
send_Pak(sendBase, calcPakSize(sendBase), dst, DATA);
(sent.second)->receive_pak(sent.first); Within Link
Change to an event at the same time and a higher priority
TO 500ms
Reference page 247
Currently every arrival of in-order segment with the expected sequence # is acked. There is no timeout window to wait for the next-in-order segment to then send out delayed ack
Triple Handshake and close connection
Additionally initialize seq # to be random
Write a unit test that tries to insert hosts and routers with the same name.
Since we are guaranteeing that all names are unique, this should fail.
Here's some functions I need implemented.
I have an object containing
std::vector<host> hosts;
std::vector<router> routers;
std::vector<link> links;
std::vector<flow> flows;
Simply put I need these following functions
bool nodeExists(std::string id);
bool hostExists(std::string id);
bool routerExists(std::string id);
Here's an example if it was a vector of strings and some resources
//http://codereview.stackexchange.com/questions/59997/contains-algorithm-for-stdvector Create contains and overload
//http://stackoverflow.com/questions/6939129/how-to-use-stdfind-stdfind-if-with-a-vector-of-custom-class-objects
//http://stackoverflow.com/questions/30406408/stdfind-on-vector-of-objects-with-overloaded-operator
//http://stackoverflow.com/questions/19187766/find-using-overloaded-operator
Given: std::vector<std::string> ids;
// If used returns true
bool net::usedID(std::string id){
auto result = std::find(std::begin(ids), std::end(ids), id);
return result != std::end(ids));
}```
You might want to define the helper functions getHost, getRouter, and getNode which return pointers to the corresponding objects. Then xExists should be trivial, return the corresponding bool, i.e. true if not null.
I added debug checks everywhere... and broke something. The simulation runs fine if you give it a debug flag and compile it without defining NDEBUG i.e.
//#define NDEBUG // Comment out to turn on debug information and assertions
If you disable debugging... it disables some important part of the code somewhere. oops 4:20 am blaze it
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.