I think that I need it, because my client will not receieve any messages from my host - on the same computer - without using the localhost address...
Or are there other solutions?... I´m in game for any suggestion:)... (but I don´t want to bind the client port)...
EDIT: Where to buy the super-toaster?:D...
EDIT 2: Correct me if I am wrong, but the excerpts explain how to implement uPNP descriptions for my own device - which I don´t have^^ - and not how to use uPNP (in my particular case: Port Forwarding on the FritzBox)...
EDIT 3: I´m thinking about hole-Punching... dunno if my router detects this or not... let´s see... (any suggestions for other solutions are still appreciated :) )...
Multicast is subscribe/publish, not point-to-point like udp/tcp so it shouldn't use 127.0.0.x.
<- I do not understand to what You refer to with this
Can I assume that all other comms between the client and server are working?
I have my server that binds two ports to communicate over it - receiving and sending succeeds without any problems.
The client, of course, does not bind its communications port. Sending is no problem on the client, too. But it can´t receive anything if the Server sends the data to the sockaddress structure, that got filled by recvfrom(sock, buf, len, flag, sockaddr, fromlen); It does only work if the client sends data over an "non-internet-related" address specified in getaddrinfo("localhost", ...) and not getaddrinfo("myaddr",...)
Yes, the references are from an implementation point of view. It all depends on how much you care to know as to whether it's useful or not.
It is interesting to read about the structure of the XML-files (this is one fo the things i was wondering about, while reading in the msdn)...
EDIT: forgot to mention, that I did open the bound ports for the server process on my router manually...
POST /*path?*/ HTTP/1.0
HOST: /*myip:myPort??*/
CONTENT-LENGTH length of the body
CONTENT-TYPE: text/xml; charset="utf-8"
SOAPACTION: "urn:schemas-upnp-org:service:WANIPConnection:1#AddPortMapping"
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddPortMapping xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1">
<NewRemoteHost>/*IP of the target*/</NewRemoteHost>
<NewExternalPort>/*PortNumber*/</NewExternalPort>
<NewProtocol>/*Protocol*/</NewProtocol>
<NewInternalPort>/*port*/</NewInternalPort>
<NewInternalClient>/*My IP (internal lan ip)*/</NewInternalClient>
<NewEnabled>1</NewEnabled>
<NewPortMappingDescription>""</NewPortMappingDescription>
<NewLeaseDuration>/*INFITNITE?*/</NewLeaseDuration>
</u:AddPortMapping>
</s:Body>
</s:Envelope>
1. What path follows the POST?
2.HOST: My IP or the devices?
3.to i need to do the tabbings in the final message for the xml-style?...
5. is it really <u:AddPortMapping or do i have to write: <u:actionName="AddPortMapping" ?