summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
AgeCommit message (Collapse)Author
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-09-13Use <stdbool.h> and replace _Bool with bool.iphydf
This header is a requirement for the public API, therefore is assumed to exist. It is a C99 standard library header, and _Bool is not intended to be used directly, except in legacy code that defines bool (and true/false) itself. We don't use or depend on such code. None of our client code uses or depends on such code. There is no reason to not use bool.
2016-09-13Group #include directives in 3-4 groups.iphydf
1. Current module (if C file). 2. Headers from current library. 3. Headers from other library (e.g. toxcore includes in toxav). 4. System headers.
2016-09-10make the majority of the callbacks stateless and add some status to a testcasemichael bishop
2016-09-09Minor cleanups: header reordering, adding {}.iphydf
I hadn't done this for the "fun" code, yet. Also, we should include system headers after our own headers. "In general, a module should be implemented by one or more .cpp files. Each of these .cpp files should include the header that defines their interface first. This ensures that all of the dependences of the module header have been properly added to the module header itself, and are not implicit. System headers should be included after user headers for a translation unit." -- http://llvm.org/docs/CodingStandards.html#a-public-header-file-is-a-module
2016-09-06Make friend requests statelessGregory Mullen (grayhatter)
Messenger is slightly twisty when it comes to sending connection status callbacks It will very likely need at the very least a partial refactor to clean it up a bit. Toxcore shouldn't need void *userdata as deep as is currently does. (amend 1) Because of the nature of toxcore connection callbacks, I decided to change this commit from statelessness for connections changes to statelessness for friend requests. It's simpler this was and doesn't include doing anything foolish in the time between commits. group fixup because grayhatter doesn't want to do it "arguably correct" is not how you write security sensitive code Clear a compiler warning about types within a function.
2016-09-05Make packet data a ptr-to-const.iphydf
Ensure that nobody inadvertly modifies the temporary packet data buffer.
2016-09-01Sort #includes in all source files.iphydf
2016-09-01Match parameter names in declarations with their definitions.iphydf
The parameter names were taken from function definitions to update the names in function declarations (prototypes).
2016-08-27Move logging to a callback.iphydf
This removes the global logger (which by the way was deleted when the first tox was killed, so other toxes would then stop logging). Various bits of the code now carry a logger or pass it around. It's a bit less transparent now, but now there is no need to have a global logger, and clients can decide what to log and where.
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2015-12-16Less packet spam.irungentoo
2015-11-21Increase max file transfer speed.irungentoo
Fix bug that limited it to 1K packets per second.
2015-11-21More file transfer improvements.irungentoo
2015-11-20File transfer fix.irungentoo
2015-11-19Send queue size should not affect the speed of packets being resent.irungentoo
2015-11-19Attempted fix of disconnect when switching from TCP to UDP.irungentoo
2015-11-11Attempted fix of UDP disconnect bug that happens when both ipv4 and ipv6 are ↵irungentoo
connected.
2015-11-11Lower chances of disconnect during file transfers.irungentoo
2015-11-09File transfer fixes.irungentoo
Fixed file transfers disconnecting tox clients from each other in some network conditions.
2015-06-23Added code to net_crypto to calculate rtt.irungentoo
2015-05-21Load only secret key from tox save, not public key.irungentoo
Calculate public key from it.
2015-05-17Some protocol efficiency improvements.irungentoo
Reduced the amount of waste from dropped packets.
2015-05-16Don't resend the same packet twice within a short timeframe.irungentoo
2015-05-04Fixed possible connection issue.irungentoo
2015-04-24Fixed a couple possible issues with the friend connection callback.irungentoo
A TCP callback could be received when only a UDP connection was present. Increased a UDP timeout to make it less likely to time out and switch to TCP.
2015-04-18Some changes to net crypto.irungentoo
Should fix certain connection issues that sometimes happen. The dht public key of the peer must be known to create the connection. If the dht pk of the peer changes when a connection is active, it is killed to make way for the new one.
2015-04-18Enable proxy support in TCP_connection.irungentoo
2015-04-15Made net_crypto use TCP_connection.irungentoo
TODO: -Reconnection. -If UDP connction is good, connect to less TCP relays. -Store some TCP relays in friend connection associated to each friend?
2015-04-03Attempted fix of on off UDP connection causing toxcore to disconnect fromirungentoo
the friend.
2015-03-13When link can't send packets anymore, stop the request chunk callback.irungentoo
Removed time variable in packet struct and replaced it with sent variable.
2015-01-17Attempted fix of Tox disconnecting during file transfers by tweakingirungentoo
some congestion control numbers.
2015-01-16Tox should work better on TCP only when some people have broken TCPirungentoo
nodes and don't update them. Paths now try to use the same TCP node for their entire lifetime.
2015-01-07Send less net_crypto packets.irungentoo
Increased interval for sending packets that include cookie request packets, handshake packets and request packets.
2014-12-26Merge branch 'http-proxy-feature' of ↵irungentoo
https://github.com/nurupo/InsertProjectNameHere
2014-12-21Some refactoring of proxy codeMaxim Biro
2014-12-15Some optimizations on how TCP relays are used.irungentoo
2014-12-15Increased max TCP connections.irungentoo
2014-11-21Cleaned up packet length types in toxcore.irungentoo
They are now all uint16_t instead of sometimes being uint32_t. Replaced some other uint32_t with unsigned ints.
2014-11-11Prevent connection ips from switching on LAN.irungentoo
2014-11-03Added some comments to net_crypto.hirungentoo
2014-10-18File transfer speed should jump up a bit faster.irungentoo
2014-09-26Remove timestamp from set_connection_dht_public_key().irungentoo
2014-09-26Removed useless code from onion_client.irungentoo
Astyled.
2014-09-26Added callbacks to onion_client and net_crypto for the temp dht key.irungentoo
Better than the polling mess. Moved DHT to Messenger from onion_client (still needs some cleanups).
2014-09-18Lowered minimum transfer speed.irungentoo
2014-09-09spelling correctionscgar
2014-08-29Removed useless code.irungentoo
2014-08-29Lossless crypto packets can now be sent without the congestion control ↵irungentoo
applying to them.
2014-08-27Added function to check if packet sent with net_crypto was received.irungentoo