org-arl / unet-contrib

Unet user contributions
BSD 3-Clause "New" or "Revised" License
11 stars 15 forks source link

Support for Reliable Datagram transmission using UnetSocket C APIs #55

Closed prasadtiru closed 3 years ago

prasadtiru commented 3 years ago

Updated the following:

  1. unetsocket_send(..) API updated to support reliability when transmitting datagrams.
  2. Added a sample program txdata-reliable.c to demonstrate the usage of reliable transmission by receiving the DatagramDeliveryNtf or DatagramFailureNtf message.

An example run:

> samples/txdata-reliable localhost 242 1101                            
Connecting to localhost:1101
Transmitting 9 bytes of data to 242
Datagram delivered succesfully at the receiver node!
Transmission Complete
prasadtiru commented 3 years ago

That's a good point. I have added unetsocket_send_reliable() now to allow backward compatibility.