c - How to connect socket via external IP (Mac ) -
c - How to connect socket via external IP (Mac ) -
my question is, how connect socket on romote mechine? can connect sockets on same network..
i wrote simple code (in c), simulate server (open socket , hear client). in mac.
i'm trying connect socket client iphone (with simple objectiv-c code).
if net on both, server , client, on same network (wifi) , in client trying connect 192.168.1.x, it's working. when, in client, i'm trying connect via external ip (with same port) connection failed.
i never did bofore. maybe miss somthing.. i've tried turn firewall off. did not help.
thanks.
edit: if it's not clear.. mac connected router.
in setting this, "external ip" typically ip of router. in likelihood you'll need configure router forwards relevant port internal ip address.
it case port forwarding work, request has come in on external (wan) interface. depends on how router configured. if that's case, you'll need create sure you're accessing external ip via cellular network , not wi-fi connection on iphone.
c sockets ip port external
Comments
Post a Comment