networking - Unable to set global unicast address in Server client program using Qt -


i'm new ipv6 , i'll explain issue in detail. using qt have developed server client program using qt.

->i used local link address in both server , client.

->and ip address changes terminal terminal, if run server 3 terminals server ip address different 3 terminals , client has different ip addresses.

->i want discover exact/current server address client program connect server @ run time.

how can that, please suggest.

and second issue is, on changing local link global unicast address might ip -6 neigh show work because global link expose on network.

in case i'm trying change below code: previous code: qhostaddress address = qhostaddress::anyipv6; server starts , stay in listening state.

manually assigning global unicast address below code. qhostaddress address; address.setaddress("2001:0db8:0000:0002:0022:2217:ff3b:118c"); time server not started, saying address not available.

please suggest in regards.

for discovering connected servers, send udp datagrams ff02::1. multicast address reach every connected ipv6 device on link (link-local scope). of course means servers needs listen datagrams.

the simple service discovery protocol (ssdp) uses kind of approach.

for server problem, have been nice have more code.

assuming did similar that:

qhostaddress address; address.setaddress("2001:0db8:0000:0002:0022:2217:ff3b:118c"); qtcpserver server; server.listen(address) 

it means listen on 2001:0db8:0000:0002:0022:2217:ff3b:118c , therefore address should assigned 1 of interface (network card).


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -