irungentoo
a377f55b3d
Allow sending data after file is paused.
...
Dissallow sending non requested data.
2015-06-30 22:05:40 -04:00
irungentoo
50e0802a62
Removed useless parameter from new_TCP_server()
2015-06-28 22:14:54 -04:00
irungentoo
f0433595f9
Fixed warning.
2015-06-22 22:34:19 -04:00
irungentoo
ce077eeeb3
Fixed rare bug where userstatus, name, etc... would not be sent to friend.
2015-05-26 20:52:09 -04:00
irungentoo
f7d203925f
Fixed bug when deleting friend that we are connected to in group chat.
2015-05-26 20:30:24 -04:00
irungentoo
2ba076ac5c
Load only secret key from tox save, not public key.
...
Calculate public key from it.
2015-05-21 20:39:47 -04:00
irungentoo
40f113c077
Added tcp test.
2015-05-14 21:07:29 -04:00
irungentoo
53c6b26a7e
Connect to own TCP server if hosting one.
...
Removed useless code.
2015-05-12 20:59:28 -04:00
irungentoo
3a28a8c5fb
Added basic TCP server hosting to tox.h api.
...
TODO: tell friends we are hosting a relay and prioritize using relays
hosted by friends over bootstrap ones.
2015-05-08 22:03:24 -04:00
irungentoo
d2929881ca
Removed useless code.
2015-05-03 20:53:25 -04:00
irungentoo
69e3e5f3a4
Move LAN discovery from Messenger to friend_connection.
2015-04-27 16:13:04 -04:00
irungentoo
3e256e429f
Fixed a couple possible issues with the friend connection callback.
...
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-24 11:09:42 -04:00
irungentoo
3bd4f5902c
Move the send tcp relay packet from Messenger to friend connection.
2015-04-21 20:12:24 -04:00
irungentoo
453548f181
Some messenger fixes.
2015-04-18 11:15:59 -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
565d73713a
Store TCP relays tied to friend and reconnect to some when reconnecting.
2015-04-16 14:17:57 -04:00
irungentoo
db931f0aa9
Fixed typo.
2015-04-05 20:55:26 -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
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
48249360dc
Removed unused variable.
2015-03-30 20:58:43 -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
47d1c1db7e
Added some more checks for file packets.
2015-03-23 16:56:56 -04:00
irungentoo
8c2347222a
Transfers with filelength == 0 now behave exactly like transfers of every
...
other size (except streaming of course).
2015-03-21 08:35:31 -04:00
irungentoo
f2a017c055
Allow sending of file transfer requests with length 0 but don't allocate
...
any file number for them in core.
These can be used to tell friends we don't have an avatar set or to unset
a set avatar.
2015-03-20 21:15:44 -04:00
irungentoo
b1ec157175
For file transfers UINT64_MAX is now used as the size for streaming
...
transfers instead of 0.
For avatar transfers file size 0 now means that the client has no avatar
set.
Added a test for streaming transfers.
2015-03-20 20:12:07 -04:00
irungentoo
d711362622
Merged normal message function and send action function into one
...
messaging function.
This removes code duplication and allows us to easily add new message
types to the api without having to add new functions.
2015-03-18 15:32:53 -04:00
irungentoo
ad87dbb470
Kill all file transfers associated with the friend when friend goes
...
offline.
2015-03-17 17:23:47 -04:00
irungentoo
ea8d27259f
Added tox_file_send_seek() function to api.
...
This function can be used to seek an incoming file tranfer right
before accepting it.
It is meant to be used to resume incomplete file tranfers by clients.
2015-03-17 15:05:17 -04:00
irungentoo
e072079620
Allow file names to be of length 0.
...
Pointer in callback will be NULL if length is 0.
2015-03-17 13:47:09 -04:00
irungentoo
24c70c9e84
Added and implemented file_id parameter to file tranfers.
...
file_id is a 32byte identifier that can be used by users to identify
file tranfers across core/client restarts in order to resume broken
file tranfers.
In avatar tranfers it corresponds to the hash of the avatar.
Added tox_file_get_file_id() function to api to obtain the file_id
of an ongoing file transfer.
If not set, core will generate a random one.
2015-03-17 13:44:48 -04:00
irungentoo
ec659491b2
Avatar hash is now the filename of the file transfer instead of the
...
first 32 bytes.
Enforce length of filename in core when transfer is an avatar type
transfer to make things more safe.
2015-03-15 18:35:22 -04:00
irungentoo
11e8e8bd3a
When link can't send packets anymore, stop the request chunk callback.
...
Removed time variable in packet struct and replaced it with sent
variable.
2015-03-13 16:51:41 -04:00
irungentoo
96d9cef66c
File kind is now a uint32_t.
...
This allows clients to agree on what numbers mean what without having
it be set in core.
2015-03-13 13:00:35 -04:00
irungentoo
669975c226
tox_file_send_chunk() must now send data the same length as requested
...
in the requested chunk callback.
For zero size transfers if the data sent is not the same length, the
file is assumed to be done.
2015-03-13 12:40:21 -04:00
irungentoo
0d67598aed
File transfer fixes and improvements.
2015-03-12 18:01:08 -04:00
irungentoo
7e5ca487b5
Don't assume tox_file_send_chunk() is called in the request chunk
...
callback.
2015-03-12 16:05:18 -04:00
irungentoo
8dc2db2025
Added position parameter to tox_file_send_chunk().
...
This is done so that the function now has the same parameters as the
request chunk callback.
2015-03-12 15:17:34 -04:00
irungentoo
7afab000f7
tox_new now sets error to TOX_ERR_NEW_PORT_ALLOC when binding to port fails.
2015-03-12 13:03:14 -04:00
irungentoo
43fe6e71bd
tox_callback_connection_status() implemented.
...
Attempted fix of connection checking to make it more stable.
2015-03-11 15:37:25 -04:00
irungentoo
0207fcdfb0
Implementation of new api file transfers.
...
Everything should work except resuming.
2015-03-10 17:31:50 -04:00
irungentoo
576e5ee703
Updated new_filesender function in Messenger.c
2015-03-09 19:21:51 -04:00
irungentoo
4c4ffb7409
Fixed case where a recv and a sending file would have the same number.
...
recv file numbers are now (file num in packet + 1) << 16
2015-03-09 14:32:37 -04:00
irungentoo
14af278ca8
Updated File request packet to new format.
...
[uint8_t packet_id (PACKET_ID_FILE_SENDREQUEST)][uint8_t file_number]
[uint32_t type][uint64_t file_size][filename (currently max 255 bytes)]
recv file numbers are << by 16 to distinguish them from sending files.
2015-03-06 22:06:58 -05:00
irungentoo
f66f9fe76e
enums are no longer typedefed to uint8_t.
2015-03-05 12:49:38 -05:00
irungentoo
ac7da66529
Code cleanups.
...
Fixed wrong variable used, removed useless elements of struct.
2015-03-05 12:30:50 -05:00
irungentoo
8524911177
Removed useless TODO comments.
2015-03-04 20:28:17 -05:00
irungentoo
7a82565c8c
Merge branch 'port_range_option' of https://github.com/saneki/toxcore into new_api
2015-03-02 21:03:34 -05:00
irungentoo
680c7c2ecd
Merge branch 'new_api' of https://github.com/dubslow/toxcore into new_api
2015-03-01 20:14:01 -05:00
irungentoo
8e59a826cb
Removed backwards compatibility code from core.
...
That function should be static.
2015-02-27 21:18:43 -05:00
saneki
6e8762b30a
Allow for specifying the port range to use in Tox_Options
2015-02-27 11:58:00 -06:00