How to create a udp connection with defined source port? #3124
-
Is it possible to define the source port of an outgoing udp connection? I can not find any hint in the documentation or tutorials. I know that this is unusual, but I want to talk with an API endpoint that responds only to udp connections from a specific port, 7090 in this case. The api endpoint is from a Keba Wallbox. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Not that unusual, it would be like a communication between servers. Open a listener on that port and use that connection to send. |
Beta Was this translation helpful? Give feedback.
Not that unusual, it would be like a communication between servers. Open a listener on that port and use that connection to send.
You have to effectively bind to that port so no one else uses it, so in the case of UDP it makes total sense to open a listener there.