Commit Graph

3426 Commits

Author SHA1 Message Date
irungentoo
2a2390b5e7
Assign some TCP relays for use with onion packets and keep them connected
for that purpose.
2015-04-17 20:50:05 -04:00
irungentoo
92a708578f
Properly share connected relays and connect to the friend correctly
with them.
2015-04-16 20:39:09 -04:00
irungentoo
de8956267c
Some fixes and improvements.
Fixed that the first TCP relays in the list would never be disconnected
even if they were useless.
2015-04-16 19:19:21 -04:00
irungentoo
7d466fda2c
Only increase connection lock if connection is actively used to connect
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-16 15:17:47 -04:00
irungentoo
565d73713a
Store TCP relays tied to friend and reconnect to some when reconnecting. 2015-04-16 14:17:57 -04:00
irungentoo
0bc3730387
Made net_crypto use TCP_connection.
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-15 20:53:21 -04:00
irungentoo
f8087887fe
If we know the pk that the oob packet was sent from treat it as a normal data packet. 2015-04-15 20:51:36 -04:00
irungentoo
be014f9e3c
Fixed memory leak in TCP connection. 2015-04-15 19:52:13 -04:00
irungentoo
34265616bd
Some work done on TCP_Connection.
The main thing left to do is the reconnect if we get disconnected part.
2015-04-15 19:47:57 -04:00
irungentoo
2ff39d3d54
Fixed windows warning. 2015-04-14 20:56:16 -04:00
irungentoo
4b29aff04a
TCP connection mostly done.
Only thing left is testing and integrating it in net_crypto.
2015-04-13 19:29:45 -04:00
irungentoo
d05e39274c
Make tox_new return TOX_ERR_NEW_PORT_ALLOC for all socket related errors. 2015-04-13 08:32:33 -04:00
irungentoo
42d8be4ce9
Added link to multiple nospam PR. 2015-04-12 16:52:24 -04:00
irungentoo
4ea4a5e3f3
Merge branch 'patch-2' of https://github.com/GrayHatter/toxcore 2015-04-12 16:50:01 -04:00
irungentoo
39b66c2180
Merge branch 'rtobsd' of https://github.com/carbin/toxcore 2015-04-12 16:34:03 -04:00
irungentoo
405558258d
Enable SO_REUSEADDR on TCP server socket. 2015-04-11 20:24:39 -04:00
irungentoo
11b750c745
More work on TCP connection.
Only a couple things left to add.
2015-04-10 19:50:47 -04:00
irungentoo
4e1f49955a
Some more work on TCP connection. 2015-04-09 20:59:33 -04:00
irungentoo
3c87c84223
tox_hash fix. 2015-04-09 09:50:24 -04:00
irungentoo
c3a6c5b92e
Small change to TCP test. 2015-04-08 20:50:19 -04:00
Carlin
7db063e93d do not check for librt on OpenBSD
clock_gettime is in OpenBSD's libc
2015-04-09 03:57:07 +12:00
irungentoo
3e9c4e80f0
TCP_connection started.
The plan is to move some of the TCP stuff from net_crypto into it.
2015-04-07 20:19:30 -04:00
irungentoo
cf436fde12
Fixed onion test. 2015-04-06 15:57:23 -04:00
GrayHatter
27cd42a4c1 Update the toxcore todo list
added markdown formatting as well!
2015-04-06 11:37:29 -07:00
irungentoo
db931f0aa9
Fixed typo. 2015-04-05 20:55:26 -04:00
irungentoo
083bfdd25a
Use define instead of 0. 2015-04-04 19:21:51 -04:00
irungentoo
b279a4a883
Fixed offline callback being called when connection timed out and died
without ever actually being connected.
2015-04-03 17:20:20 -04:00
irungentoo
62dad7b3f7
File transfer fixes.
Don't allow non transferring files to be paused and then resumed
starting the file transfer.
2015-04-03 17:16:36 -04:00
irungentoo
6315ff2362
Attempted fix of on off UDP connection causing toxcore to disconnect from
the friend.
2015-04-03 14:29:58 -04:00
irungentoo
5593d7318a
Merge branch 'last_online' of https://github.com/JFreegman/toxcore 2015-04-02 22:06:00 -04:00
Jfreegman
856fb583ed
API function to get last seen timestamp of friend
also removed remnants of the no longer used variable ping_lastrecv
2015-04-02 21:53:24 -04:00
irungentoo
abff31d2ad
Merge branch 'master' of https://github.com/dubslow/toxcore 2015-04-01 19:57:31 -04:00
Dubslow
36ed4956fd
Enough pestering me please 2015-04-01 15:28:39 -05:00
irungentoo
a2df5f2f57
Increased max possible amount of TCP connections in TCP server when using epoll. 2015-04-01 13:31:28 -04:00
Dubslow
f7beee495e
Make keys into a struct for more programmer safety 2015-03-31 21:16:04 -05:00
Dubslow
9b66c57bd0
Fix minor code duplication 2015-03-31 19:30:09 -05:00
irungentoo
a47fad15e0
Merge branch 'comment-fix' of https://github.com/JFreegman/toxcore 2015-03-31 19:45:25 -04:00
irungentoo
99e0fde297
Merge branch 'master' of https://github.com/dubslow/toxcore 2015-03-31 19:44:51 -04:00
Jfreegman
c7276ac7bb
Amend comments to reflect undefined filenumber and friendnumber behavior 2015-03-31 19:43:44 -04:00
Dubslow
e998aca8f7
Fix toxencryptsave to be consistent with new_api
Upon my own decision, the two tox_encryped_new convenience functions were removed due to basically needing two different sets of error codes.
At iphydf's suggestion the corresponding tox_get_encrypted_savedata convenience functions were removed as well.
2015-03-31 18:31:23 -05:00
irungentoo
48249360dc
Removed unused variable. 2015-03-30 20:58:43 -04:00
irungentoo
4e94a45af2
Merge branch 'tox_friend_delete_additinal_documantation' of https://github.com/Raffinate/toxcore 2015-03-29 13:17:33 -04:00
irungentoo
abff19fdcc
Increase thread safety.
randombytes() doesn't seem to have any real speed disadvantage.

Also makes people who think nonces need to be random happy.
2015-03-29 13:14:13 -04:00
Aleksey Mokhovikov
eedf26a36d Additional description for tox_friend_delete. 2015-03-29 17:59:44 +06:00
irungentoo
212bbf2129
Merge branch 'master' of https://github.com/stqism/ToxCore 2015-03-28 21:44:09 -04:00
irungentoo
1d583fa111
Fixed file transfer bug.
This should have been at the beginning of the loop, not the end.
2015-03-27 21:49:11 -04:00
irungentoo
725a52851d
Comment fix. 2015-03-27 10:51:50 -04:00
irungentoo
06b389ea5e
Making tox_encrypted_new() use the same error codes as tox_new was a bad idea.
They now have their own error codes.
2015-03-26 12:39:09 -04:00
Sean
c59a6d48ac Revert "Update documentation link"
This reverts commit e294faeb4d.
2015-03-25 23:55:20 -07:00
irungentoo
e888b89ac9
Merge branch 'patch-3' of https://github.com/urras/toxcore 2015-03-25 20:38:34 -04:00