summaryrefslogtreecommitdiff
path: root/Source/Core/Common/TraversalClient.cpp
AgeCommit message (Collapse)Author
2018-11-19NetPlay: Implement chunked data transferTechjar
This sends arbitrary packets in chunks to be reassembled at the other end, allowing large data transfers to be speed-limited and interleaved with other packets being sent. It also enables tracking the progress of large data transfers.
2018-06-14Common/Random: Add convenience template for simple arithmetic valuesLioncash
In cases where we just want a random value for a primitive arithmetic type, we can wrap this in a template to allow convenient direct assignment instead of keeping declaration and initialization separate (making it more difficult to use values uninitialized). This also allows the use of Common::Random with functions such as std::generate, making it more flexible in how random values can be generated.
2018-05-31Common: Add Random utilitiesLéo Lam
This makes it easier to generate random numbers or fill a buffer with random data in a cryptographically secure way. This also replaces existing usages of RNG functions in the codebase: * <random> is pretty hard to use correctly, and std::random_device does not give enough guarantees about its results (it's implementation-defined, non cryptographically secure and could be deterministic on some platforms). Doing things correctly is error prone and verbose. * rand() is terrible and should not be used especially in crypto code.
2018-04-16TraversalClient: Use u32 instead of enet_uint32Lioncash
Lessens the dependence on the enet library (and we really don't need to rely on a third-party library for a 32-bit integer type)
2018-04-16TraversalClient: In-class initialize members where applicableLioncash
2018-04-16TraversalClient: Make data externally read-only members privateLioncash
These are only ever queried for state, not written. Therefore, prevent writing to the members and make them private.
2017-09-09Common: Move version strings to their own headerLioncash
Ideally Common.h wouldn't be a header in the Common library, and instead be renamed to something else, like PlatformCompatibility.h or something, but even then, there's still some things in the header that don't really fall under that label This moves the version strings out to their own version header that doesn't dump a bunch of other unrelated things into scope, like what Common.h was doing. This also places them into the Common namespace, as opposed to letting them sit in the global namespace.
2017-08-08TraversalClient: make FailureReason an enum classMichael M
2017-07-22TraversalClient: Fix memory leaks in ReleaseTraversalClient()Lioncash
release() relinquishes ownership of a pointer, it doesn't actually free it.
2016-07-23Improve netplay setup dialog UXAestek
* Focus "Hash Code" / "IP address" text box by default in "Connect" * Focus game list in "Host" tab * RETURN keypress now host/join depending on selected tab * Remember last hosted game * Remove PanicAlertT: * Simply log message to netplay window * Remove them when they are useless * Show some netplay message in OSD * Chat messages * Pad buffer changes * Desync alerts * Stop the game consistently when another player disconnects / crashes * Prettify chat textbox * Log netplay ping to OSD Join scenario: * Copy netplay code * Open netplay * Paste code * Press enter Host scenario: * Open netplay * Go to host tab * Press enter
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-12-02Merge pull request #2876 from CastellaFactory/masterMarkus Wick
[Netplay] Add "Force Netplay Listen Port" feature that was in old netplay branch
2015-09-26Common: Remove other Common prefixed headers from Common.hLioncash
2015-09-20[Netplay:Traversal] Add "Force Netplay Listen Port" feature that was in old ↵CastellaFactory
netplay branch
2015-03-18Traversal: Use a decent PRNG instead of rand()mathieui
we don’t need cryptosecure random, but having a uniform distribution is always better.
2015-03-18NetPlay: Make the enet interrupts workmathieui
Otherwise, it would work but any async sending would be delayed by 4ms or wait until the next packet was received. Also increase the client timeout to 250ms, since enet_host_service is now really interrupted.
2015-03-01Fix -Wswitch warningTillmann Karras
2015-02-25Added TraversalServer.cpp to Core/CommonZiek
2015-02-25Added Gui elements in Netplay Setup Diag so a person can choose a traversal ↵Ziek
server Fixed bug with UPnP so that it will grab the proper address and protocal Fixed bug that caused dolphin to freeze when host codes were to large
2015-02-25Fixed issue where players were not disconnecting correctlyZiek
2015-02-25Change netplay initial gctime to be determined by the hosts initial timeZiek
2015-02-25Moved Traversal Client code over from old netplayZiek
Moved over gui code for copying host code added gui to netplay diag setup to switch between direct and traversal connection