3

"Gcdwebserver doesn't work if i connected with different WiFi network." It only works if my mobile and PC is in the same WiFi network. What i have to do if i want GcdwebServer work even in different WiFi network?

Kevin Mac
  • 320
  • 2
  • 10
  • 1
    Not sure why that's not a reasonable question. There are [NOT] either too many possible answers, or good answers would be too long for this format. In any case, GCDWebServer doesn't care about what network your device / computer running it is on. All you need is make sure that your device and the port on which GCDWebServer runs can be reached from the outside world. What is most likely happening here is that whatever router or switch between your 2 WiFi networks is blocking communications on port 80 or 8080. – Pol Sep 03 '15 at 14:49
  • I got your point you are right. currently i am using port 80 now what should i do to make my device and port on which GCDWebServer runs can be reached from the outside world. or which port i have to use as if port 80 block communication. i tried port 33455 but it won't work for me. @Pol – Kevin Mac Sep 04 '15 at 09:30
  • 1
    This is a networking problem, not a GCDWebServer one. You have to check the configuration of your WiFI router and possibly set up port forwarding. – Pol Sep 04 '15 at 14:11
  • Thanks for ans. Can i do port forwarding programmatically? @Pol – Kevin Mac Sep 05 '15 at 13:31
  • 1
    Yes, as other software do it, but I don't know you configure a NAT traversal from an app. – Pol Sep 05 '15 at 18:43
  • No, I have not configure NAT. After some research i found DNSServiceNATPortMappingCreate function included in bonjour libraries. So, how can i use that in GCDWebServer? Please suggest me how to configure NAT from an app. @Pol – Kevin Mac Sep 07 '15 at 07:53
  • Latest version of GCDWebServer has built-in support for NAT traversal by the way. – Pol Oct 12 '15 at 16:49
  • Thanks for support @Pol – Kevin Mac Oct 13 '15 at 17:54
  • Hey, how do i enable NAT because by default it is disabled. – Kevin Mac Dec 18 '15 at 05:28
  • See `GCDWebServer.h` for the API. – Pol Dec 18 '15 at 13:07
  • When i install pod "GCDWebServer/WebUploader", "~> 3.0" i am not able to find GCDWebServerOption_RequestNATPortMapping – Kevin Mac Dec 18 '15 at 13:34

0 Answers0