127.0.0.1:8000 (Django アプリケーション) でサーバーを実行しています。すべて問題ありません。ブラウザまたは curl からアクセスできます。
しかし、データを送信するために ESP8266 を接続しようとすると、何かが壊れており、localhost サーバーに接続することさえできません。
I have tried:
conn = net.createConnection(net.TCP, false)
conn:on("connection", function(conn, payload) print("in connection") end)
conn:connect(8000, "127.0.0.1")
Nothing is printed.
I tried with conn:connect(8000, "localhost")
, conn:connect(8000, "http://127.0.0.1")
, conn:connect(80, "127.0.0.1")
. Same results, nothing is printed. With the last one, I have a "DNS fail!" message.
Just to check, with conn:connect(80, "www.google.com")
, "in connection" is printed.
Any guess?