c++ - UDP Cannot Assign Requested Address -
i want open datagramsocket , send packets network device. when use following cood exception thrown saying: cannot assign requested address: 192.168.1.114:1900
poco::net::socketaddress sa("192.168.1.114",1900); poco::net::datagramsocket dgs(sa); std::string text = "hello"; dgs.sendbytes(text.data(),text.size());
what's problem here. use udp testing software test receiving end if it's capable receive udp packets on port , works, poco code above not work.
kind regards
i don't know poco
must bind
local address , port, sendto
send packet from local address:port remote address , port.
Comments
Post a Comment