Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 19 08:26
    coveralls commented #461
  • Nov 19 08:17
    kurnevsky synchronize #461
  • Nov 19 08:17

    kurnevsky on dht_state

    refactor(dht): introduce a sing… (compare)

  • Nov 13 13:08
    kurnevsky commented #459
  • Nov 13 12:44
    kpp commented #459
  • Nov 13 08:17
    coveralls commented #461
  • Nov 13 08:10
    kurnevsky opened #461
  • Nov 13 08:10

    kurnevsky on dht_state

    refactor(dht): introduce a sing… (compare)

  • Nov 13 06:40

    kurnevsky on rust2021

    (compare)

  • Nov 13 06:40
    kurnevsky closed #460
  • Nov 13 06:40

    kurnevsky on master

    chore(rust): use 2021 edition Merge pull request #460 from to… (compare)

  • Nov 13 05:08

    suhr on rustfmt

    (compare)

  • Nov 12 21:08
    kurnevsky synchronize #460
  • Nov 12 21:08

    kurnevsky on rust2021

    chore(rust): use 2021 edition (compare)

  • Nov 12 21:00
    kurnevsky synchronize #460
  • Nov 12 21:00

    kurnevsky on rust2021

    chore(rust): use 2021 edition (compare)

  • Nov 12 20:53
    kurnevsky opened #460
  • Nov 12 20:53

    kurnevsky on rust2021

    chore(rust): use 2021 edition (compare)

  • Nov 12 20:50

    kurnevsky on nom

    (compare)

  • Nov 12 20:49
    kurnevsky closed #266
Evgeny Kurnevsky
@kurnevsky
Not right now, but we are close. You can use net crypto connection to send custom packets to friends. Right now it works with udp and recently I managed to make tcp part work as well (only locally, there are still bugs and not yet done things). Also we don't have pleasant api for it yet - it looks like echo server example you recently saw which is too complex right now.
inosms
@inosms
Sounds really good though! What kind of API are you imagining? Maybe I can help a bit with that!
Evgeny Kurnevsky
@kurnevsky
I think about high level wrapper for all this onion-net_crypto-friends machinery. Something like this: https://github.com/TokTok/c-toxcore/blob/master/toxcore/tox.h
inosms
@inosms
I see, this might be too big of a task for me as I am just starting to grasp the whole project...
Roman
@kpp

branch file_sending:

error[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
   --> examples/echo.rs:169:31
    |
169 |                 Box::new(fs_c.send_file_control(pk, packet.file_id, TransferDirection::Receive, ControlType::Accept)
    |                               ^^^^^^^^^^^^^^^^^
    |

Any idea how to fix it?

@kurnevsky ?
Evgeny Kurnevsky
@kurnevsky
It's because of the signature of send_file_control.
    pub fn send_file_control(&self, friend_pk: PublicKey, file_id: u8, dir: TransferDirection, control: ControlType)
                             -> impl Future<Item=(), Error=SendPacketError> + Send + '_ {
Roman
@kpp
+ '_ is required?
Cho
@NamsooCho
Yes. It is required to compile.
Evgeny Kurnevsky
@kurnevsky
It requires &self to live as long as future.
@NamsooCho do you really need all these futures inside send_file_control?
It seems get_friend can return plain value.
Then I see a lot of and_thens that also don't need to be futures...
It seems the only real future is send_file_control_packet?
Cho
@NamsooCho
Ok
Thanks Evgeny
Evgeny Kurnevsky
@kurnevsky
But I'm not sure what happens there, I only look there for a few minutes :)
btw, it seems it should work if you make clones of self outside of and_then closures.
But anyway I'd refactor it to not deal with all these futures.
Cho
@NamsooCho
OK.
Thanks Evgeny. Very helpful.
Cho
@NamsooCho
I succeed to compile file_sending and in toxic /add <…..real_pk…> to cargo run —example echo is not working.
@kurnevsky ?
Roman
@kpp
echo.rs works on master branch
Cho
@NamsooCho
Then there is no way to test file_sending?
Roman
@kpp
There is
You should fix your branch file_sending to make echo.rs work again
It was your code to break echo.rs
Cho
@NamsooCho
give me a hint, please
Roman
@kpp
Ok now I got the latest branch and it worked
Also there are a lot of errors:
[2019-06-20T17:44:48Z ERROR echo] Processing ended with error: RecvPacketError { ctx: 

There is no file transfer session opened }
Cho
@NamsooCho
How to test?
Roman
@kpp
run cargo run --example echo
take toxid from your tox id is: ....
open toxic, type: /add $ID
that's all
Roman
@kpp
Ok looks like we are loosing crypto connection to our friend.

@kurnevsky sometimes I got:

[2019-06-20T17:53:30Z ERROR tox::toxcore::dht::server_ext] Failed to handle packet: HandlePacketError { ctx: HandlePacketError { ctx: 

No crypto connection for address: V4(10.211.1.21:33445) }

And my messages from toxic -> echo are stuck. Then I got:

INFO  tox::toxcore::friend_connection] Found a friend's IP address

And they are sent successfully again.

Cho
@NamsooCho
Maybe my internet connection is not enough to test echo.rs
Roman
@kpp
No
Looks like there is an issue in echo.rs too.
Cho
@NamsooCho
I am using docker
Cho
@NamsooCho
I think CI build fail is because of nom’s bugs.
Roman
@kpp
I agree
inosms
@inosms
can I use a setup like in echo.rs and net_crypto to send arbitrary packets between two nodes? How can I initiate a connection between two nodes running tox-rs?
Evgeny Kurnevsky
@kurnevsky
@inosms you can. You need to generate two long term keys (tox addresses) and add them to friends like in echo.rs on each side.
Then you can send custom lossless packets.