ypo / flute

FLUTE (File Delivery over Unidirectional Transport) in RUST
MIT License
14 stars 4 forks source link

Python exemple #12

Closed Ad-Vitam closed 9 months ago

Ad-Vitam commented 10 months ago

Hello,

I am trying to use the python binding from the README doc. But the python exemple didn't work.

With the receiver exemple, the error is :

  File "/root/Flute/test.py", line 3, in <module>
    receiver_writer = receiver.FluteWriter("/root/Flute/dest")
                      ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'receiver' has no attribute 'FluteWriter'

maybe : receiver_writer = receiver.ObjectWriterBuilder("/root/Flute/dest")

With the sender exemple, the UDP sending code is missing.

If you have time, can you update ? Thanks

ypo commented 10 months ago

Please let me know if it works for you.

The python bindings are still behind the RUST API and not well tested

Ad-Vitam commented 10 months ago

Thanks for your help, that's a bit better but now :

Traceback (most recent call last):
  File "/root/Flute/receiver.py", line 15, in <module>
    pkt = receive_from_udp_socket()
          ^^^^^^^^^^^^^^^^^^^^^^^
NameError: name 'receive_from_udp_socket' is not defined
ypo commented 9 months ago

UDP/IP reception is actually not implemented by this FLUTE library. It's up to the application to implement the transport layer.

So the application needs to implement its own method to receive packets. receive_from_udp_socket() is only an example.

I can update the documentation to make that clear.

Ad-Vitam commented 9 months ago

Thanks for your comment, its more clear for me