# \[UDP Library\] Can you tell if 'udp.send' is successful?

**URL:** <https://discourse.processing.org/t/udp-library-can-you-tell-if-udp-send-is-successful/38554>\
**Category:** Libraries\
**Created:** [August 30, 2022, 1:40am UTC](https://discourse.processing.org/t/udp-library-can-you-tell-if-udp-send-is-successful/38554 "2022-08-30T01:40:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [August 30, 2022, 1:40am UTC](https://discourse.processing.org/t/udp-library-can-you-tell-if-udp-send-is-successful/38554/1 "2022-08-30T01:40:01Z")

</div>

'import [hypermedia.net](http://hypermedia.net).\*; ’ library

```auto
import hypermedia.net.*;
UDP udp;  

void setup() {

  size(300,300);
  udp = new UDP( this, 12001 );
  udp.listen( true );
  
  String message = "test"; 
  String ip = "92.168.0.189";  
  int port = 11999;    
  udp.send( message, ip, port ); // Did you succeed? failed?

}

```

 ![fig](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/f/5f31507f42614356263c504de69e484b50e81e28.jpeg)

Can you tell if ‘udp.send’ is successful?

‘udp.send()’ comes in boolean form. Even if I turn off the internet and work ‘udp.send()’, only ‘true’ value is displayed.

1. Is there a way to check if the Internet is live in real time?
2. Or is ‘udp.send()’ successful? is it a failure? Can you judge?

---

<div class="post-metadata">

**Author:** ![f42ter](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/f42ter/32/16793_2.png) [@f42ter](https://discourse.processing.org/u/f42ter)\
**Post date:** [August 30, 2022, 5:27am UTC](https://discourse.processing.org/t/udp-library-can-you-tell-if-udp-send-is-successful/38554/2 "2022-08-30T05:27:30Z")

</div>

You will find your answer in [USE Datagram Protocol (Wikipedia)](https://en.wikipedia.org/wiki/User_Datagram_Protocol) section Reliability and congestion control.

So in case you need some reliability, add a simple checksum computation to your data, in case checksum is incorrect reject the data. There are many other ideas to solve this issue.
