Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does ConnectionRefused do?

This is a method of DatagramProtocol class in Twisted. As I understand UDP protocol doesn't guarantee that someone is listening on the given port even using ConnectedDatagramProtocol.

Can someone explain to me, when this method is called and how I suppose to check if there is someone listening to my transmission using UDP?

like image 291
labuzm Avatar asked Nov 13 '22 14:11

labuzm


1 Answers

If the datagram socket is connected, it can receive ICMP Port Unreachable messages via the Sockets API, which presumably maps into calling this method. Note that I am not speaking of the TCP connect operation here, but the Sockets connect() method, which can be called on a UDP socket, and which presumably maps into some method in the API you are using.

like image 84
user207421 Avatar answered Nov 15 '22 05:11

user207421