summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
AgeCommit message (Collapse)Author
2018-01-14Make TCP_Client_Connection a module-private type.iphydf
2018-01-10Fix formatting in some C files.iphydf
Also replace &(x) with &x for consistency.
2017-08-24AF_INET -> TOX_AF_INETDiadlo
2017-06-04Add a monolith_test that includes all toxcore sources.iphydf
This requires that every symbol, even if static (file-scope), is unique. The idea is that we can easily run "whole" program static analysis on programs that include monolith.h ("whole" is in quotes, as we don't include dependencies like libsodium in this static analysis).
2017-04-22Revert "Implement tox_loop"Maxim Biro
This reverts commit 5ff099763b1f56414572e1c12eb2f003117db5a0.
2017-04-01Implement tox_loopAnsa89
2017-01-28Add VLA compatibility macro for C89-ish compilers.iphydf
2017-01-19Update license headers and remove redundant file name comment.iphydf
"All rights reserved" was incorrect. The project was licensed under GPL3, which means a lot of rights are licensed to everybody in the world, i.e. not reserved to the "Tox Project".
2017-01-11Check that TCP connections aren't dropped in callbacks.iphydf
They aren't, but it's unclear whether it's structurally impossible.
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-22Make TCP_Connections module-private.iphydf
2016-09-16Ensure that all TODOs have an owner.iphydf
In the future, all TODOs added either need a bug number (TODO(#NN)) or a person's github user name. By default, I made irungentoo the owner of all toxcore TODOs, mannol the owner of toxav TODOs, and myself the owner of API TODOs.
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-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-02Do not use `else` after `return`.iphydf
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-08-31Add braces to all if statements.iphydf
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2016-01-27 fix: compare sensitive data with sodium_memcmpRoman Proskuryakov
fix: make increment_nonce & increment_nonce_number independent of user-controlled input fix: make crypto_core more stable agains null ptr dereference
2015-06-28Fixed last PR.irungentoo
2015-06-28Clarifications for the TCP APIJfreegman
2015-06-16Made new_tcp_connections() not depend on dht.irungentoo
2015-05-06Removed useless line.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-23Fixed some warnings.irungentoo
2015-04-22Fixed a case where the tcp_data_callback would get called when theirungentoo
connection only worked 1 way.
2015-04-22Fixed possible issue.irungentoo
2015-04-21Only allocate some TCP connections for onion use when needed.irungentoo
Added a function to enable and disable TCP onion connections.
2015-04-21If a net_crypto connection isn't using the TCP relays, disconnect from them.irungentoo
TCP_connections can now be put to sleep, a state where they store what they were connected to without being connected and then resumed from sleep.
2015-04-19Removed useless stuff.irungentoo
2015-04-18Send oob packets to all relays tied to the connection.irungentoo
Don't fallback to sending oob packets if pipe for normal connection is clogged.
2015-04-18Enable proxy support in TCP_connection.irungentoo
2015-04-18If connected tcp relay becomes disconnected, try to reconnect once.irungentoo
2015-04-17Assign some TCP relays for use with onion packets and keep them connectedirungentoo
for that purpose.
2015-04-16Properly share connected relays and connect to the friend correctlyirungentoo
with them.
2015-04-16Some fixes and improvements.irungentoo
Fixed that the first TCP relays in the list would never be disconnected even if they were useless.
2015-04-16Only increase connection lock if connection is actively used to connectirungentoo
to a friend. Give the connection a couple seconds (TCP_CONNECTION_ANNOUNCE_TIMEOUT) to connect itself to the friend before killing it if we are already connected to enough total relays.
2015-04-15If we know the pk that the oob packet was sent from treat it as a normal ↵irungentoo
data packet.
2015-04-15Some work done on TCP_Connection.irungentoo
The main thing left to do is the reconnect if we get disconnected part.
2015-04-13TCP connection mostly done.irungentoo
Only thing left is testing and integrating it in net_crypto.
2015-04-10More work on TCP connection.irungentoo
Only a couple things left to add.
2015-04-09Some more work on TCP connection.irungentoo
2015-04-07TCP_connection started.irungentoo
The plan is to move some of the TCP stuff from net_crypto into it.