adroitandroid / Near

A P2P library for Android for discovery on local networks using UDP and transfer in general using TCP sockets
https://goo.gl/kioAiQ
MIT License
346 stars 92 forks source link

File sharing #6

Open yleyvag opened 6 years ago

yleyvag commented 6 years ago

This library is awesome, I was stuck creating a P2P chat with no middle servers and any other softwares, it never worked with sockets, it was a huge problem, also I was using NSD for device discovery, it works really bad. This library save me, the discovery is very fast and the chat was easy to integrate on my app. I would like to know if it stills on development, the last commit was on July so I'm not sure of what's gonna happen now. I have to add file sharing on my app so I need to know if we will have it on Near.

adroitandroid commented 6 years ago

Thanks, your words are encouraging! I'm currently in an Android job, so Android as a hobby has taken a backseat. I can try to help with file sharing integration, it's something I too wanted to make :)

ravirajjak commented 6 years ago

@yleyvag this library receives in bytes. so you can convert files into bytes and share.

yleyvag commented 6 years ago

@ravirajjak what if want to share 1 GB file? I'm sure that converting into bytes may cause crashes and wasting of resources.

adroitandroid commented 6 years ago

If we need to load the entire file into the memory, that doesn't make sense... I hadn't developed for the file transfer use case, might need to explore more to figure out a smart solution. If you guys are already working with file transfer, maybe you can point me to the right direction

ravirajjak commented 6 years ago

@yleyvag then transfer it in chunks

yleyvag commented 6 years ago

@ravirajjak I don't think that could be a good solution for the problem.