Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

UDP sockets (no replies)

$
0
0
I need interaction between WD Linux daemon (as client) and C++ Linux daemon (as server). I have a server that listen UDP port 0.0.0.0:8080 (i.e. binded to ANY_ADDR) and wait for some data from WD daemon. Server is absolutely working (tested using nc command from other terminal) and information is received.

What I do in WD source code

SocketCreateUDP("SOCK",8080,"127.0.0.1")
SocketWrite("SOCK", "data", "127.0.0.1", 8080)
SocketClose("SOCK") // I even commented this line to not close socket

After running WD compiled daemon I get an error when socket is creating "Error associating socket with 8080 port on 127.0.0.1 computer". Please could you someone explain why?
When I use result of NetIPAddress() instead "127.0.0.1" I have no error but server does not receive anything. Moreover NetIPAddress() returns 127.0.1.1 instead 127.0.0.1. Any ideas how to send data to UDP port? Has anyone the experience in UDP interaction?

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>